Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
coherence works by sharing game world data via a Replication Server in the cloud and passing it to the connected Clients.
The Clients and Simulators can define areas of interest (LiveQueries), levels of detail, varying simulation and replication frequencies and other optimization techniques to control how much bandwidth and CPU power is used in different situations.
The game world can be run using multiple Simulators that split up simulation functions or areas of the world accordingly.
Fast authority transfer and remote commands allow different authority models, including Client authority, Server authority, distributed authority and combinations like Client prediction with input queues.
The platform handles scaling, synchronization, persistence and load balancing automatically.
A lean and performant server that keeps the state of the world and replicates it efficiently between various Simulators and Game Clients. The Replicator usually runs in the coherence Cloud, but developers can start it locally from the command line or the Unity Editor.
A build of the game. To connect to coherence, it will use the coherence SDK.
A version of the Game Client without the graphics ("headless client") optimized and configured to perform server-side simulation of the game world. When we say something is simulated on the server, we mean it is simulated on one or several Simulators.
A text file defining the structure of the world from the network's point of view. The schema is shared between the Replicators, Simulators and Game Clients. The world is generally divided in components and archetypes.
Code generation
The process of generating code specific to the game engine that takes care of network synchronization and other network-specific code. This is done using a CLI tool called Protocol Code Generator that takes the schema file and generates code for various engines (e.g. C# for Unity).
The process of making sure the state of the world is eventually the same on the Replicator, Simulators and Game Clients, depending on their areas of interest.
coherence works by sharing game world data via a Replication Server in the cloud and passing it to the connected Clients.
The Clients and Simulators can define areas of interest (LiveQueries), levels of detail, varying simulation and replication frequencies and other optimization techniques to control how much bandwidth and CPU power is used in different situations.
The game world can be run using multiple Simulators that split up simulation functions or areas of the world accordingly.
Fast authority transfer and remote commands allow different authority models, including Client authority, Server authority, distributed authority and combinations like Client prediction with input queues.
The platform handles scaling, synchronization, persistence and load balancing automatically.
Peer-to-peer support (without a Replicator) is planned in a future release. Please see the Peer-to-peer page for updates.
Read about new features, important changes and fixes for version 1.1
Don't forget to check out our SDK when switching versions!
Published 26.03.2024
Fixed
Commands routing pop-up doesn't block information with scrollbars on a few specific scaling settings anymore.
CoherenceRelayManager no longer causes a stack overflow in rare circumstances if there are errors in the underlying UDP transport.
Published 08.02.2024
Fixed
Labels no longer overflow when UI Scaling is set above 100% (on Windows: Edit > Preferences... > UI Scaling).
Changed
Creating a Command on the Configure Window now defaults to "Send to Everyone, including yourself".
Published 23.01.2024
Added
Sample Scenes were added and are now accessible from the package samples section and coherence's Explore Samples menu.
Fixed
Source Generator no longer skips baked scripts that don't compile.
CoherenceNode: no longer teleports to origin when reparenting.
Published 12.12.2023
Added
coherence > Local Replication Server > Backup World Data
toggle.
Changed
Hub: Persistence renamed to Backup World Data, and disabled by default for local replication servers.
Fixed
Version label in the Hub now copies correct OS information to the clipboard.
CoherenceSync's Configure window no longer shows the Animator Controller on variables that have the same name as animation parameters.
No longer send invalid updates when gaining authority.
Published 28.11.2023
Added
CoherenceSync: added support for nested Prefabs and hierarchies via PrefabSyncGroup
component.
Sample: matchmaking with manual authentication.
CoherenceBridge: added ability to disconnect from within the inspector.
CoherenceSync: added support for byte
, sbyte
, short
, ushort
and char
.
Changed
CoherenceNode: improved stability.
CoherenceSync: reworked Play Mode panel on the inspector.
CoherenceSync: we now allow sending commands while disconnected (method gets called locally).
CoherenceSync: Configure window shows variables and methods tagged with [Sync]
and [Command]
.
CoherenceScene: editor scene visibility settings split for Clients and Simulators.
Reworked interpolation. Removed overshoot settings.
Reworked code generation. Now, it's implemented on the Unity/C#-side.
Updated JWT implementation, which is no longer provided as a pre-build DLL. This also prevents dependency conflicts.
HTTP request timeout changed from 1 second to 10 seconds.
Multi-Room Simulators Wizard: reworked, simplified layout.
Fixed
Game Object getting deselected after adding CoherenceSync.
Reduced the amount of GC allocs made for better performance.
Release WebSocket when leaving Play Mode.
Instantiated InterpolationSettings never getting destroyed.
Time scale related issues, including jitter and low-FPS scenarios.
Restrict and warn about the 31 components per entity limitation.
Resolve inheritance when sending commands.
Client Connection Prefab instances initialization issue when using the CreateScene
API.
Issue where mixing Transform
and RectTransform
networked variables could break.
Console error after baking when Upload Schema on Baking Complete
was on.
Profiler: count messages received.
Sample: wasn't refreshing Worlds properly in some scenarios.
CoherenceSync: deleting a Component or a GameObject on the hierarchy spammed errors on the console.
Uploading WebGL builds now shows the correct information on the progress bar.
Console errors after deleting a Prefab, when the Coherence Objects Window has been opened and closed.
Removed
Unity 2020 support. (Minimum supported version is now Unity 2021.3 LTS)
Published 06.10.2023
Added
Extrapolation: Max Overshoot Allowed range increased to [0, 20].
Extrapolation: Expose stale factor (defaults to 2).
Changed
Highly reduced GC allocs made while serializing.
Fixed
WebSocket request timings.
OnValueSynced not triggering when the update packet came with a parenting change.
Shifting the floating origin now correctly shifts rigidbodies in the same frame without kicking in the physics interpolation.
Published 05.09.2023
Added
Descriptor Providers: two new properties were added to Bindings, called OverrideGetter and OverrideSetter. Setting this to true will allow you to write custom code blocks in your getters and setters, as opposed to being limited to "UnityComponent.{myCustomCode}".
CoherenceBridge API: TranslateFloatingOrigin(Vector3d) overload.
Fixed:
Floating Origin: fixed entities jittering on remote clients when Floating Origin is changed.
Published 11.08.2023
Published 10.08.2023
CoherenceNode: Reset on OnDisable.
Reset entity reference when destroying the entity.
Force re-cache SchemaID after writing Gathered.schema to disk.
Published 25.07.2023
Commands: fixed trying to send a command from an inherited class that is bound in the parent class.
Bindings: fixed rare cases where RectTransform bindings would be reported as missing.
Client Connection Prefabs: fixed Client Connection instances duplication when changing Physics scene.
Coherence Profiler: fixed count of messages received.
ReplicationServerRoomsService: fixed RemoveRoom methods.
Optimize window rendering issue where rows would disappear.
Published 04.07.2023
Still, nothing beats Release Notes for a quick and comprehensive review of the changes, so go ahead!
Minimum supported version is now Unity 2021.3 LTS.
Lobby Rooms
Unity multi-scene support
TCP Fallback
Client-hosting
Profiler: a coherence Profiler module for basic networking information.
Added support for object pooling and a default pooling implementation.
Protocol: added support for ordered components so parenting component changes always arrive with related position changes.
CloudService: non-static public API to communicate with your coherence Cloud project.
Samples: Explore Samples window.
Samples: New Connection Dialog Samples for Rooms and Worlds.
Enter Play Mode Options (No Domain Reload) is now fully supported.
CoherenceSyncConfigRegistry: Added new ScriptableObject to soft reference CoherenceSync assets in runtime and serialize how they are loaded and instantiated.
INetworkObjectProvider: Added runtime interface to be able to customize how CoherenceSync assets are loaded, with three default implementations (Resources, Direct Reference and Addressables)
INetworkObjectInstantiator: Added runtime interface to be able to customize how CoherenceSync prefabs are instantiated, with three default implementations (Default, Pooling and DestroyCoherenceSync)
CoherenceSyncConfigUtils: Editor public API to be able to add, delete and browse CoherenceSync assets, aswell as start or stop syncing variables via scripting.
CoherenceSync Objects Editor Window: New Editor window to be able to browse CoherenceSync assets, found under coherence => CoherenceSync Objects menu item.
UniquenessManager: Encapsulated uniqueness logic under CoherenceBridge.UniquenessManager, where you will be able to register unique IDs at runtime.
AuthorityManager: Encapsulated authority transfer logic under CoherenceBridge.AuthorityManager, where you will be able to send authority transfer requests without accessing the CoherenceSync directly.
ReplicationServerRoomsService: non-static public API to be able to create, delete and fetch rooms from self-hosted Replication Servers.
CoherenceSync: Rigidbody Update Mode.
CoherenceSync: Advanced Uniqueness Options.
CoherenceSync: CoherenceBridge resolver API.
Coherence.Editor.UploadBuildToCoherence API.
CoherenceSync: CoherenceSync instances are now automatically synced and unsynced with the network in the OnEnable/OnDisable methods, instead of Start/OnDestroy.
CoherenceSync: CoherenceSync instances can now be disabled and reused for different network entities, which allows for object pooling to happen.
CoherenceSync Baked Scripts: Baked scripts for CoherenceSync prefabs are no longer MonoBehaviours.
Uniqueness: Improved handling unique IDs for Unique CoherenceSyncs when creating serialized scene Prefab instances.
Updated JWT to 10.0.2.
Reworked AutoSimulatorConnection component.
ParrelSync/symlink support: avoid read exceptions on Gathered.schema.
CoherenceSync: Initialization of disabled objects.
CoherenceSync: adding the component to a Prefab no longer deselects it.
Source Generator: avoid running on IDEs, to avoid IO-related exceptions.
Simulator Slug not being encoded correctly.
CoherenceNode: race condition when setting parent.
PrefabMapper has been removed in favor of CoherenceSyncConfigRegistry.
NetworkTime.Time
PlayResolver API: Play, PlayClient and PlayResolver have been deprecated in favor of CloudService API.
Sample UI: the old Sample UI that depended on the PlayResolver API has been deprecated in favor of the new Unity Package Samples.
CoherenceUUID: This Component is no longer needed and it has been deprecated, the functionality has been baked into the Editor and now works automatically. Prefabs that use this Component can stop using it.
CoherenceMonoBridgeSender: This Component is no longer needed and it no longer has any functionality, it can be safely removed.
Client Connection Prefab References: References to the Prefabs in CoherenceBridge have been deprecated. Please use CoherenceSyncConfig references instead.
Check out our on 1.1!
Tutorial Project: Released the where you will be able to delve into more advanced aspects of how to use coherence.
There's a lot to say about hitting the coherence 1.0 milestone, so we did that in a dedicated . It also provides fuller descriptions of the highlight features that come with 1.0.
If you're updating from version 0.10, please check out our .
coherence is a network engine, platform and a series of tools to help anyone create a multiplayer game.
Fast network engine with cloud scaling, state replication, persistence and auto load balancing.
Easy to develop, iterate and operate connected games and experiences.
SDK allows developers to make multiplayer games using Windows, Linux or Mac, targeting desktop, console, mobile, VR or the web.
Game engine plugins and visual tools will help even non-coders create and quickly iterate on a connected game idea.
Scalable from small games to large virtual worlds running on hundreds of servers.
Game-service features like user account and key-value stores.
At the core of coherence lies a fast network engine based on bitstreams and a data-oriented architecture, with numerous optimization techniques like delta compression, quantization and network LOD-ing ("Level of Detail") to minimize bandwidth and maximize performance.
The network engine supports multiple authority models:
Client authority
Server authority
Server authority with client prediction
Authority handover (request, steal)
Distributed authority (multiple simulators with seamless transition)
Deterministic client prediction with rollback ("GGPO") - experimental
coherence supports persistence out of the box.
This means that the state of the world is preserved no matter if clients or simulators are connected to it or not. This way, you can create shared worlds where visitors have a lasting impact.
The coherence SDK only supports Unity at the moment. Unreal Engine support is planned. For more specific details and announcements, please check the Unreal Engine Support page. For custom engine integration, please contact our developer relations team.
Once you have followed the instructions on how to install the coherence SDK package for Unity, you will be able to explore the package Samples with no additional downloads. You can either:
Go to: Coherence > Explore Samples
Open Unity's Package Manager (Window > Package Manager) and navigate to the package samples
Note that the Samples are meant to be self-explanatory, so they come with no documentation.
If the scenes show up as magenta/pink after importing the samples, it's because the samples are made for the built-in pipeline and your project is using either URP or HDRP.
To fix this in URP, go to: Window > Rendering > Render Pipeline Converter
Click on the checkboxes to choose what to convert (Materials is necessary), then click the Initialize and Convert button. After a brief loading, you should see the sample scenes displayed correctly.
For more information, refer to Unity's guides for URP or for HDRP.
Using the same scene as in the , let's see how to easily sync animation over the network.
| Bindings
WASD or Left stick: Move character
Hold Shift or Shoulder button left: Run
Spacebar or Joypad button down: Jump
We haven't mentioned it before, but the character Prefab does a lot more than just syncing its position and rotation.
When you move around, you will notice that animation is also replicated across Clients. This is done via synced Animator parameters (and Network Commands, but we cover these in the ).
Very much like in the example about position and rotation, just sending these across the network allows us to keep animation states in sync, making it look like network-instantiated Prefabs on other Clients are performing the same actions.
Open the player Prefab located in the /Prefabs/Characters
folder. Browse its Hierarchy until you find the child GameObject called Workman. You will notice it has an Animator
component.
Select this GameObject and open the Animator window.
As is usually the case, animation is controlled by a few Animator parameters of different types (int, bool, float, etc.).
Make sure to keep the GameObject with the Animator component selected, and open the coherence Configure window:
You will see that a group of animation parameters are being synced. It's that simple: just checking them will start sending the values across, once the game starts, just like other regular public properties.
There is only one piece missing: animation Triggers. We use one to trigger the transition to the Jump state.
Did you notice that we are able to configure bindings even if this particular GameObject doesn't have a CoherenceSync
component on it? This is done via the one attached to the root of the player Prefab. These parameters on child GameObjects are what we call deep bindings. Learn more in the lesson, or on .
Since Triggers are not a variable holding a value that changes over time, but rather an action that happens instantaneously, we can't just enable in the Config window like with other animator parameters. We will see how to sync them in the , using Network Commands.
The basics of coherence
The First Steps project contains a series of small sample scenes, each one demonstrating one or more features of coherence.
If you're a first time user, we suggest to go through the scenes in the established order. They will guide you through some key coherence and networking concepts:
Remember that playing the scenes on your own only shows part of the picture. To fully experience the networked aspects, you have to play in one or more built instances alongside the Unity Editor, and even better - with other people.
The Unity project can be downloaded from its Github repo. The Releases page contains pre-packaged .zip files.
To quickly try a pre-built version of the game, head to this link and either play the WebGL build directly in the browser, or download one of the available desktop versions.
Share the link with friends and colleagues, and have them join you!
Once you open the project in the Unity Editor, you can build scenes via File > Build Settings, as per usual.
If you want to try all the scenes in one go, keep them all in the build and place SceneSelector as the first one in the list.
If you're working on an individual scene instead, bring that one to the top and deselect the others. The build will be faster.
To be able to connect, you need to also run a local Replication Server, that can be started via coherence > Local Replication Server > Run for Worlds.
You can try running multiple Clients rather than just two, and see how replication works for each of them. You can also have one Client just be the Unity Editor. This allows you to inspect GameObjects while the game runs.
Since you might be building frequently, we recommend making native builds (macOS or Windows) as they are created much faster than WebGL.
You can also upload a build to the cloud and share a link with friends. To do that, follow these steps or watch this quick video to learn how to host builds on the coherence Cloud.