Game dev
Saved & recent

Deterministic replay

Related terms: record and replay, determinism, recovery, regression testing

Reproducing a simulation by starting from the same state and feeding it the same recorded inputs. The result must match, not merely look similar. This lets developers investigate failures, compare changes or recover an earlier game state.

Player commands alone may be insufficient. Timing, random-number state, external responses and execution order must also be controlled or recorded where they affect results. The code and game data must be compatible with the recording. League of Legends' Chronobreak uses deterministic server replay to restore an earlier match state after an incident, rather than restarting the whole match.

Example
Riot Games, Chronobreak and determinism
Further reading
Riot Games: Determinism in League of Legends: Implementation
seed 42 +1 +2 +1 recorded inputs original replay pos 1 · score 0 pos 2 · score 1 pos 4 · score 2 pos 5 · score 2 pos 1 · score 0 pos 2 · score 1 pos 4 · score 2 pos 5 · score 2 recovery point
Both runs start with seed 42 and apply the same moves. Positions, remaining pickups, and scores match at each step. The second completed move is a possible recovery point.

View in the full Game dev collection