Authoritative server (netcode)
In multiplayer games, the server decides the true game state; clients only send inputs and predict what will happen.
If clients decided where they are or whether they hit, cheating would be trivial. With an authoritative server, clients send inputs, the server simulates and broadcasts the result. To hide network delay, the client predicts its own movement immediately and corrects it when the server answers (client-side prediction and reconciliation), while other players are shown slightly in the past (interpolation).
Related terms
- Durable Objects: Cloudflare’s single-instance objects with their own storage: one place in the world that owns a piece of state.
- Edge computing (Workers): Running code in data centers close to the user, on the CDN, instead of in one central region.
- Event loop: How JavaScript runs one task at a time and queues the rest: callbacks, promises (microtasks), timers and rendering.
