When prediction is wrong
Client side prediction guesses the future. Sometimes the guess is wrong, because another player pushed you or the server resolved a collision differently. Server reconciliation is how the client snaps back to truth without feeling jerky.
The replay technique
The server sends back an authoritative snapshot stamped with the last input sequence number it processed. The client then:
- Discards all buffered inputs up to and including that acknowledged number.
- Resets its local state to the server snapshot.
- Replays every input that came after it on top of the corrected state.
Because the client reapplies its newer inputs, the player keeps moving smoothly even while a correction lands underneath.
Why replay rather than overwrite
- A naive overwrite would teleport the player back in time to an old position.
- Replaying preserves the inputs the player issued while the snapshot was in flight.
- The result converges to the authoritative state with minimal visible glitching.
Key idea
Reconciliation resets the client to the latest authoritative snapshot, then replays newer unacknowledged inputs so corrections stay smooth.