Delta encoding keeps Old Light’s 100-player galaxies running in a browser tab

A browser tab left open for days shouldn’t wake up to a 10,000-star galaxy fully retransmitted. Yet that’s exactly what happens in many real-time strategy games when the server sends the whole world state every time something changes. Old Light, a browser-based 4X game, sidesteps this by sending compact “patches” instead—textbook delta encoding in action.
How a patch carries the galaxy forward
When a player builds a starbase or a rival scouts a sector, the server doesn’t broadcast the entire galaxy. Instead it emits a WorldDelta message listing only what changed: players who joined or left, updated player rows, sectors whose public map data became stale, and market or negotiation moves. Each entry contains the new absolute state—score, fleet composition, treasury—not incremental deltas. The client merges these absolutes into its local copy, repainting only the affected roster rows, HUD elements, or hexes. Because every value is the new total, a duplicated message leaves the client unchanged, and a missed one can be repaired by the next update without corruption.
Same event, different view
Delta encoding collides with information hiding in Old Light. While ownership of stars is public, the inner workings of an empire—buildings, income, fleets—are visible only to the owner (until scouted by rivals). A single change in your empire therefore generates two different patches: one stripped of sensitive details for anonymous spectators, another revealing the full picture for you and any rivals who have scouted you. The server broadcasts the same skeleton message to every socket, but each client interprets it through its own knowledge filter.
Why it matters
Old Light’s approach shows how modern browser games can scale to hundreds of concurrent players without choking on bandwidth or latency. By shipping absolute state updates tailored to what each player is allowed to see, the game keeps a tab open for days without ever retransmitting the full galaxy—even when players reconnect from different networks after long pauses. It’s a practical answer to the challenge of real-time synchronization in an environment where exactly-once, in-order delivery can’t be guaranteed.
Source: DEV Community. AI-assisted editorial synthesis — TechnoExpress.

