MISSION_LOG // 2026-09-02
Notes from a realtime game room
Connections are temporary. The game state should not be.
GamesWebSockets
Example article — written to demonstrate the blog. Edit or replace before publishing.
Realtime games expose the difference between a connection and a player. A browser can reconnect, refresh or fall asleep without the person intending to leave.
Make moves explicit
Treat a move as an intention that the server validates. The interface can be optimistic, but the rules need an authoritative home.
type Move = {
roomId: string;
playerId: string;
expectedRevision: number;
action: "pass" | "place";
};
Design for interruption
- Give each room a versioned state.
- Validate actions against that state.
- Send a fresh snapshot when someone reconnects.
A little attention to recovery makes a casual game feel much more dependable.
END OF TRANSMISSION ■
Back to the blog