Fusion 107 - Where to go next
- Shared And Server Mode
- Predictive Spawning
- Lag Compensation
- Area Of Interest
- Prebuilt Components
This 100 series has covered several of the basic concepts used by Fusion, but there is a lot more under the hood. Fusion has components and features to solve almost any network related problem multiplayer games run into, but not everything is relevant for all types of games.
After the fusion 100 series the recommendation is to read the manual and dive into more samples. Some of the more advanced topics are listed below.
There are various samples available for Fusion which are split into two categories:
- Game Samples focus on gameplay development. They generally showcase a particular core gameloop.
- Technical Samples focus on technical implementation patterns involving Unity and Fusion for multiplayer game development.
Shared And Server Mode
As an alternative to the hosted mode discussed in this 100 series, Fusion also supports other network topologies, like shared mode where clients share state authority of objects and there is no single host that "owns" the world.
When running both host and client on the same machine it will appear as if both spawn the object at the same time, however, introducing a little lag will make it apparent that the client is not spawning any object at all - rather, it waits for the host to spawn the object.
This is the nature of host authority, however, Fusion does allow clients to spawn temporary placeholders and will automatically re-use these temporary objects if the spawn is confirmed by the host.
This provides a much smoother client-side feel and is fairly straight forward to implement.
In fast-paced shooters, strict server authority introduces a problem because the world seen by the server is not exactly the same as the view on any given client.
A client may very well have an enemy dead center in his crosshairs when firing a shot, but by the time the server validates the shot, things have changed.
Some network designs solve this by letting the client make the hit decision, but that introduces a high risk of cheating.
Instead, Fusion supports lag compensated raycasts which essentially allow the server to do a raycast from the perspective of a given client.
Area Of Interest
In large world games with many players, network usage can be optimized by not sharing everything with everybody all the time.
Specifically, Fusion allows the game to assign several areas of interest for the player to exclude changes in network state occuring outside of these areas.
Fusion 100 only covers a few of the pre-built components that come with Fusion - specifically the
NetworkTransform and the
NetworkRigidbody, but Fusion has a lot more ready-to-use components available.