← systems library
game development

Rollback Netcode

Predict, simulate to now with zero delay, and re-simulate from the past when a prediction was wrong.

Local sim Network State ring Rollback local input predicted remote draw now save state @ F prediction actual remote mispredict @ F restore @ F re-sim F → now Remote inputarrives late Predicted == actual?per frame Local inputframe F Predict remoterepeat last input Advance simto "now", 0 delay Renderframe F State ring buffersave each frame Rollback + resimrestore F → replay to now OWNERSHIP Local sim Network State ring Rollback Rollback NetcodePredict, simulate to now with zero delay, and re-simulate from the past when a prediction was wrong.
↓ Download SVG ↓ Download spec

Considerations