Almost everything written about game networking is about fast games. The classic material covers UDP and client-side prediction, in service of squeezing sixty snapshots per second through a home connection. Very little of it applies to the game I'm building.

Old Light is a multiplayer browser strategy game. A fleet takes hours to cross the galaxy and your economy keeps growing while the tab is closed. If a click takes 300ms to round-trip, nothing in the game can tell. The hard part is different: staying correct over long stretches of time, for thousands of empires at once.

One snapshot, then deltas

The client opens a WebSocket. The server answers with one message, world.init: everything this player is allowed to see, plus the server's current clock. After that, every change arrives as a world.delta, a small patch the client merges in.

socket.on("world.init", (payload) => {