← Lessons

quiz vs the machine

Gold1470

System Design

Snapshot Delta Compression

Sending only what changed since a client last acknowledged state.

5 min read · core · beat Gold to climb

Full snapshots are wasteful

A full world snapshot lists every entity position, health, and state. Sending the whole thing many times a second to many clients quickly saturates bandwidth. Most of it does not change between ticks. Delta compression sends only the differences.

Delta against an acknowledged baseline

  • The server remembers the last snapshot each client acknowledged.
  • For the new tick it sends only fields that differ from that baseline, plus the baseline reference.
  • The client applies the delta on top of its stored baseline to reconstruct the full state.

This requires the server to keep a per client history of recent snapshots until they are acknowledged. Acknowledgements ride along with the client input packets, so no extra round trips are needed.

Handling loss

These deltas usually travel over an unreliable transport. If a packet is lost the client simply has not advanced its baseline, so the next delta is computed against an older acknowledged snapshot and remains correct. There is no need to resend, only to delta against what the client truly has.

Key idea

Delta compression transmits only fields that changed since a client acknowledged baseline, slashing bandwidth while tolerating packet loss.

Check yourself

Answer to earn rating on the learn ladder.

1. What does a snapshot delta contain?

2. How does delta compression handle a lost packet?

3. Why must the server keep a per client snapshot history?