hardConceptDesignMidSeniorStaff
Walk me through what rollback netcode does on a single frame, and what it costs to run it.
Rollback netcode predicts remote input so local gameplay never waits for the network. When the real input arrives, the client restores the saved state from that frame and re-simulates forward, trading CPU and correction artifacts for responsive controls.
5 min readUpdated 2026-08-15
Answer
Short answer
Predict missing remote inputs, save simulation snapshots, and when late inputs disagree, rewind to the old frame and replay to the present within one render frame.
Was this answer helpful?
Likely follow-ups
- Why does rollback suit a two-player fighting game far better than a sixty-player battle royale?
- What changes in the algorithm if you add two frames of deliberate input delay on top of rollback?
- How do you keep a hit-spark effect from firing twice when the frame that spawned it is re-simulated?
- Your state snapshot has grown to a size where copying it every frame blows the frame budget. What do you do?
Related questions
- When would you choose deterministic lockstep over an authoritative server, and what does each model cost you?hardAlso on determinism and netcode5 min
- What has to be captured for a training result to be reproducible?mediumAlso on determinism4 min
- How would you design a deployment pipeline that can be rolled back safely?hardAlso on rollback7 min
- How do you roll back a model in production?hardAlso on rollback6 min