·6 min read·By Mario Antolovic

Deterministic Multiplayer in Unity with Photon Quantum

Why competitive multiplayer games need deterministic simulation, how Photon Quantum's rollback model works, and the practical lessons from shipping online combat on it.

MultiplayerPhoton QuantumNetcode

Most Unity multiplayer problems come down to one question: do all players see the same game? For casual co-op, "close enough" is fine. For a fighting game or a competitive action title, it isn't — a single frame of divergence can hand one player a win they didn't earn. That's the problem deterministic netcode solves, and it's the reason I reach for Photon Quantum on competitive projects.

What "deterministic" actually means

A deterministic simulation produces identical output from identical input on every machine. No Random without a shared seed, no floating-point drift, no per-client physics. Instead of constantly sending game state over the network, you send only inputs, and every client re-runs the same simulation to arrive at the same result. This keeps bandwidth low and, more importantly, keeps every player's game perfectly in sync.

Rollback, without the pain

The catch is latency. If a client has to wait for every remote input before advancing, the game feels sluggish. Rollback fixes this: the client predicts remote inputs, advances immediately, and if a real input arrives that differs from the prediction, it rolls back to the last confirmed frame and re-simulates. Photon Quantum handles the rollback machinery for you — your job is to make sure the gameplay code it runs is fully deterministic.

Lessons from shipping on Quantum

  • Design gameplay inside the simulation, not around it. On Soul Fighters, combat, abilities and movement all live in Quantum's deterministic ECS. Anything that touches game state has to run there, or it will desync.
  • Buffer inputs deliberately. Fighting games depend on precise, sometimes buffered inputs. Handling input buffering and prediction explicitly — rather than hoping the engine guesses right — is what makes the game feel responsive.
  • Build tooling to reproduce online bugs. The nastiest bugs only appear across the network. Custom debug tools that let you manipulate game state and replay edge cases turn "it desyncs sometimes" into a reproducible, fixable case.

When not to use Quantum

Determinism is powerful but it's a commitment. If you're building casual co-op or a game where small differences don't matter, a lighter solution like Photon PUN2 or Fusion's shared mode will get you there faster. Quantum earns its complexity when fairness and frame-precision are the whole point.

If you're weighing a networking approach for a competitive game, that trade-off — precision versus speed of development — is the first conversation worth having.


Written by Mario Antolovic, Senior Unity Developer. More about Mario →

Let's talk

Need an experienced Unity developer for your project?

Tell me what you're building. I'll reply with a clear approach, realistic scope and honest timeline — no pressure, no jargon.