From the ROADMAP: "Reconnect / drop handling instead of hard failure." A network game should not end for everyone when one player's connection drops.
Background. The sim is lockstep: peers exchange commands, not state (CLAUDE.md, "Determinism"). A tick cannot advance without every peer's commands for it, so a lost peer stalls everyone.
Needed
- Detect a peer that has stopped sending, with a timeout, and show the others a "waiting for player" state rather than a freeze.
- Drop the player after the timeout (or on a vote), so the rest carry on. Decide what their units do: in TA a departed player's units stay on the map. Dropping has to happen on the same tick on every remaining peer, or it is a desync.
- Rejoin, the harder half. The full-state save (
save_util, hash-validated round trip) can serialise the game at a tick boundary. A returning peer could load that, then replay the commands buffered since, and rejoin the lockstep.
Where. GameNetworkService, proto/network.proto, and the launcher's game-server. Split 1+2 from 3.
Done when killing one peer's process mid-game leaves the others playing after the timeout, and with 3, the killed peer can come back.
🤖 Generated with Claude Code
https://claude.ai/code/session_018moxVoyHDBoHqkw8uqS3HX
From the ROADMAP: "Reconnect / drop handling instead of hard failure." A network game should not end for everyone when one player's connection drops.
Background. The sim is lockstep: peers exchange commands, not state (CLAUDE.md, "Determinism"). A tick cannot advance without every peer's commands for it, so a lost peer stalls everyone.
Needed
save_util, hash-validated round trip) can serialise the game at a tick boundary. A returning peer could load that, then replay the commands buffered since, and rejoin the lockstep.Where.
GameNetworkService,proto/network.proto, and the launcher's game-server. Split 1+2 from 3.Done when killing one peer's process mid-game leaves the others playing after the timeout, and with 3, the killed peer can come back.
🤖 Generated with Claude Code
https://claude.ai/code/session_018moxVoyHDBoHqkw8uqS3HX