Unity Lockstep



A WIP implementation of the Serverbeat-Protocol described here:



Getting started

  1. Open Engine/Lockstep.sln
  2. Run Server-project, enter “1” when asked for room-size
  3. Open SampleScene in Unity
  4. Hit play and wait until connection to server is established
  5. Holding right mouse button will continously spawn new agents, press ‘X’ to navigate all agents to your current mouse position

Getting Multiplayer

  1. Build and run the Unityproject
  2. Start the server. The roomsize will default to 2 after a few seconds of no input
  3. Hit play in Unity so you should now have two instances of the game running
  4. Wait until both players are connected to the server. The server will display a message when the simulation has started.
  5. For controls, same as above


  • The ECS-Project currently targets .NET Framework 4.6.1 (#806)
  • The server targets .NET Core Framework 2.2.103 (link to setup)


Inspired by LockstepFramework, in memory of SnpM:

Uses a fork of BEPUPhysics for deterministic physics:

Uses FixedMath.Net for deterministic fp-calculations:

Uses Entitas as ECS Framework:

The project includes an implementation example using LiteNetLib:


  • Physics values are limited to 1000 so keep your world in these limitations or shift the world when your values become too large