IT lexicon › Programming › Deterministic simulation

Deterministic simulation

Programming På svenska → Updated: 2026-10-26

A game loop engineered to produce bit-for-bit identical results from the same inputs on every machine — the precondition for lockstep multiplayer and replays.

If two computers run the same inputs and reach the same state, you only need to send inputs over the network, not the whole world — the foundation of lockstep strategy games like Age of Empires and StarCraft. Achieving it is hard: floating-point maths gives slightly different results across CPUs and compilers, iteration order over hash maps varies, and any un-seeded randomness diverges at once.

Studios fix this with fixed-point arithmetic or carefully pinned float settings, deterministic container ordering and seeded RNG. The same property powers compact replay files (store the inputs, re-run the sim) and rollback netcode. A single non-deterministic line causes "desyncs" that are brutal to debug.

← Back to the lexicon