Deterministic Multiplayer Synchronization of Physics Simulated Objects In Games
Practical Research
A comparative study of multiplayer physics synchronization, featuring a custom deterministic physics engine built from scratch and a production implementation using Photon Quantum.
Multiplayer games face a difficult challenge: keeping physics simulations synchronized across multiple players despite latency, packet loss, and hardware differences. For this research project, I investigated deterministic networking as a solution by implementing and evaluating two different approaches:
-
Using Photon Quantum, a commercial deterministic networking framework.
-
Building a deterministic physics system developed from scratch in Unity using fixed-point arithmetic, custom collision detection and resolution, and a lockstep networking architecture.
By comparing synchronization accuracy, responsiveness, bandwidth requirements, and implementation complexity, I explored the trade-offs between production-ready networking solutions and fully custom deterministic simulation systems.
Technologies:
-
Unity
-
C#
-
Photon Quantum
-
Unity Netcode for GameObjects
-
FixedMathSharp
-
ECS (Entity Component System)
-
Deterministic Networking
-
Lockstep Networking
-
Client Prediction & Rollback
-
Fixed-Point Mathematics
Core Systems Implemented:
-
Photon Quantum multiplayer prototype
-
ECS gameplay systems
-
Deterministic player movement systems
-
Custom deterministic physics engine
-
Fixed-point simulation pipeline
-
Sphere/AABB collision detection and resolution
-
Lockstep networking architecture
-
Multiplayer scene initialization
-
State synchronization analytics
-
Automated data collection pipeline
Technical Challenge
Traditional physics engines rely on floating-point arithmetic, which can produce different results across hardware platforms and eventually cause multiplayer clients to diverge. Deterministic networking solves this problem by ensuring that identical inputs always generate identical simulation results.
To investigate this approach, I designed a custom deterministic simulation framework that replaced floating-point calculations with fixed-point arithmetic and synchronized clients using a strict lockstep model. The goal was to determine whether a custom implementation could achieve synchronization accuracy comparable to a commercial deterministic networking solution while providing greater transparency and control over the simulation pipeline.
Photon Quantum and ECS Development

A major component of this project involved learning and developing with Photon Quantum, a deterministic multiplayer framework built around an Entity Component System (ECS) architecture.
Unlike traditional Unity development using GameObjects and MonoBehaviours, Quantum requires gameplay logic to be implemented through data-oriented ECS patterns. To support deterministic simulation, all gameplay systems operate exclusively on fixed-point data structures and execute in a strictly controlled order.
During development, I learned how to:
• Design gameplay systems using ECS principles
• Create custom components and data structures using Quantum's DSL compiler
• Implement deterministic player movement and gameplay logic
• Work with fixed-point arithmetic instead of floating-point calculations
• Configure deterministic simulation pipelines and system execution order
• Understand client prediction, rollback, and resimulation techniques used in modern multiplayer games
Using these concepts, I developed a multiplayer prototype containing player-controlled entities and dozens of continuously colliding physics objects to evaluate Quantum's synchronization behavior under dynamic gameplay conditions.
This experience provided practical exposure to large-scale deterministic networking architecture and data-oriented game development workflows commonly used in competitive multiplayer games.

Building a Custom Networked Deterministic Physics System
After studying Photon Quantum's deterministic architecture, I developed my own deterministic physics and networking framework from scratch in Unity.
The custom implementation was built using FixedMathSharp, a fixed-point mathematics library that eliminates floating-point inconsistencies across different hardware platforms. Every aspect of the simulation pipeline was implemented manually, including physics integration, collision detection, collision resolution, object initialization, and network synchronization.
Key systems developed include:
-
Fixed-point physics simulation
-
Deterministic collision detection for spheres and AABBs
-
Impulse-based collision response
-
Deterministic object initialization and ID generation
-
Lockstep networking architecture
-
Automated analytics and data collection tools
Physics data was stored using a Structure-of-Arrays (SoA) layout to improve cache efficiency and maintain deterministic execution order. Every simulation step followed a strict update sequence, ensuring identical results across all participating clients when provided with the same inputs.
To support experimentation and analysis, I also developed tooling that automatically recorded simulation data and exported results for comparison between clients.


Technical Challenges
One of the primary challenges was maintaining determinism across multiple clients. Traditional game development relies heavily on floating-point arithmetic and engine-level systems that are not guaranteed to produce identical results on different machines.
To address this, all simulation calculations were performed using fixed-point arithmetic and executed in a strictly deterministic order. Collections were sorted before processing, object identifiers were generated deterministically, and collision pairs were resolved using predictable iteration patterns.
Another challenge was implementing stable collision resolution while maintaining deterministic behavior. This required carefully designing impulse calculations, positional correction algorithms, and collision iteration logic to prevent simulation divergence.
Networking introduced additional complexity. The custom implementation used a strict lockstep model in which simulation progression depended entirely on synchronized player inputs. This guaranteed perfect state agreement but exposed the trade-off between synchronization accuracy and gameplay responsiveness under latency.
Results and Findings
The final evaluation compared Photon Quantum and the custom deterministic implementation under equivalent multiplayer conditions.
Photon Quantum demonstrated excellent synchronization accuracy while maintaining smooth gameplay through prediction and rollback systems. Across more than 30,000 positional samples, the simulation exhibited an average positional error of only 0.000178853 units between clients.
The custom implementation achieved perfect synchronization, producing a positional error of 0 across all recorded entities and simulation frames. Every client maintained an identical simulation state throughout testing.
However, the comparison revealed an important trade-off. While the custom lockstep model achieved perfect determinism, it exhibited reduced responsiveness under latency because simulation progression depended entirely on input availability. Photon Quantum's rollback architecture introduced small temporary corrections but delivered a significantly smoother gameplay experience.
This finding demonstrated that successful multiplayer networking is not solely about achieving perfect synchronization. Techniques such as prediction, rollback, and resimulation can often produce a better player experience despite introducing brief periods of state correction.

Client A (Host)

Client B
Key Takeaways
This project provided hands-on experience with multiplayer networking, deterministic simulation, ECS architecture, physics programming, and systems design.
By implementing both a production-ready deterministic networking framework and a custom deterministic physics engine from scratch, I gained practical insight into the trade-offs between correctness, responsiveness, scalability, and development complexity in multiplayer game systems.
The project reinforced an important lesson in networked game development: perfect determinism is valuable, but maintaining a responsive and enjoyable player experience often requires balancing correctness with practical networking techniques such as prediction and rollback.