Not Every Byte Gets a Vote
5 hours ago
- #replay-systems
- #determinism
- #game-development
- Deterministic replay requires recording inputs and running the same ticks to compare results, but not all state should be included in checksums.
- Checksums should only cover authoritative gameplay state that can change future outcomes, like player health, projectile position, and RNG state.
- Debug data, render interpolation, and certain caches should be excluded from checksums to avoid false replay failures from harmless changes.
- The tick system enforces a fixed phase order to provide clear checkpoints for checksums, ensuring replay consistency.
- Replay focuses on verifying that seed and inputs lead to the same authoritative state, while snapshots serialize state for save/load, which may include caches.
- Derived state, like pathfinding caches, is acceptable but must have explicit contracts, being rebuilt deterministically before use or included in checksums.
- Events are outputs that describe committed work and should not affect gameplay; render uses sim facts for presentation without inferring gameplay logic.
- A checklist helps categorize new state as authoritative, snapshot, observation, or presentation, narrowing bug searches and improving maintainability.