Game dev
Saved & recent

Entity interpolation

Related terms: extrapolation, dead reckoning, lag compensation

Other players' positions arrive only a few times per second. Drawn as received, they would teleport. So the client shows everyone else slightly in the past and lerps between the two most recent snapshots.

Extrapolation guesses ahead when a snapshot is late. Since every player sees the others in the past, the server uses lag compensation: when you shoot, it rewinds the world to what you saw at that moment before checking the hit.

Further reading
Glenn Fiedler: Snapshot Interpolation
S1 S2 S3 S4 drawn position S1 S2 S3 S4 client clock 0 100 200 300 250 350 100 ms delay simulation time (ms)
At client time 350 ms the render time is 250 ms. The violet cart is halfway between the snapshots at 200 and 300 ms.

View in the full Game dev collection