- PUN, Bolt & Fusion Comparison
- State Of The Art Features
- One Library Many Architectures
Fusion is a new high performance state synchronization networking library for Unity. With a single API, it supports many network architectures such as dedicated server, client hosted and shared/distributed authority.
It is built with simplicity in mind to integrate naturally into the common Unity workflow, while also offering advanced features like data compression, client-side prediction and lag compensation out of the box.
Fusion implements a robust tick-based simulation and state snapshots system with built-in reconciliation. This allow Fusion to work seamlessly with non-deterministic libraries like Unity PhysX.
Besides the cloud-based shared mode where each client has full authority of its own objects (like PUN before it), Fusion includes two full server-authority modes:
- a strict Client/Server setup with dedicated headless Unity instances; or,
- a player-as-host with one of the clients working as both server and client (Host);
PUN, Bolt & Fusion Comparison
Although PUN and Bolt are solid networking solutions, their architectures do not allow for further optimizations. Fusion merges all the best concepts of both PUN and Bolt, while being built from the ground up with a high-performance architecture to enable state of the art features right out of the box. The following image summarizes the improvements.
State Of The Art Features
Fusion includes state of the art features directly in the base SDK:
- Delta Snapshots and Eventual Consistency state transfer modes: Fusion can transfer either a) compressed full states (with a new and unique delta-compression technique that implies in very low CPU load); or b) state changes in controlled chunks (eventual consistency) - in which we also enable all interest management variations.
- Client side prediction + server reconciliation: the use of internal native data buffers mean the Unity-held data is always kept butter-smooth for rendering, with reconciliation and interpolation automatically (or customly) handled.
- Lag Compensation: simple to setup hitboxes combined with a comprehensive lag compensated query API that can be combined with synchronized animation for tick or sub-tick accurate competitive-grade shooting mechanics.
- RPCs: high performance RPCs are also a first-class concept in Fusion's API.
- Made for Unity MonoBehaviours: game state is fully defined as part of Unity behaviours. There is no need to write serialization or any other complicated code. It works with all of Unity's most recent prefab features like nesting and variants.
One Library Many Architectures
Fusion was developed to evolve and replace the two existing Photon state-transfer products for Unity (Bolt and PUN); it includes all supported architectures and more!
- Single Player: locally with the same code, no connection required.
- Dedicated Server: deploy Unity headless instances with full server authority.
- Client Hosted: player hosted _server + _client with built-in punch-through, relay as a fallback and full host migration (support provided by Photon Cloud).
- Shared Mode: client authority over photon-cloud with data-driven server-managed snapshots using
Eventual Consistency(EC) and interest management (
AoI: Area of Interest) which scales to high player counts.
- Shared Mode with Custom Server: Fusion's Photon Server plugin has full access to the game-state even without Unity. Writing light server game logic is achievable with little effort.
Fusion supports all of Unity's most recent Prefab features out of the box:
- Prefab Variants
- Nested Prefabs
- Nested Networked Objects (non prefabs)