← Lessons

quiz vs the machine

Gold1360

System Design

Entity Interpolation

Smoothing other players motion by rendering slightly in the past.

5 min read · core · beat Gold to climb

Choppy without it

The server sends snapshots at discrete intervals, maybe twenty per second. If the client drew each remote player at the latest snapshot position, motion would jump between updates and look choppy. Entity interpolation smooths it.

Render in the past

The client deliberately renders remote entities a small fixed delay, often around one hundred milliseconds, behind the latest snapshot. With this buffer it always has two snapshots that bracket the render time, so it can interpolate smoothly between them.

  • The client keeps a short buffer of recent snapshots per entity.
  • At render time it finds the two snapshots surrounding the target render time.
  • It blends between them by position fraction, producing fluid motion.

The cost

This delay is why lag compensation must account for interpolation: the shooter sees targets in the past. Local entities use prediction instead, so only remote entities are interpolated. If the buffer runs dry, the client may briefly extrapolate forward, which can look wrong on sudden direction changes.

Key idea

Interpolation renders remote players slightly in the past so the client always has two snapshots to blend, trading a little delay for smooth motion.

Check yourself

Answer to earn rating on the learn ladder.

1. Why does the client render remote entities slightly in the past?

2. Which entities are interpolated rather than predicted?