Match loop on the client side: orders go to the server, a confirmed turn steps the world five times, and a checksum of the shared state catches worlds that diverge
This commit is contained in:
1 parent
87890adc53
commit
42034b062b
7 files changed
+303
-10
No files matched your search
+7
-3
@@ -44,6 +44,11 @@ per turn. Fog of war, particles and the camera are local and not part of the sha
|
||||
Particles, effects and the camera keep running in real time: they are local and not part of the shared state.
|
||||
- **Who speaks**: messages, hints and interface sounds belong to the master who is being processed
|
||||
(`Game::speaking`); what another master orders never shows up on my screen.
|
||||
- **Turns and checksums** (`netplay.rs`): `Game::start_match(sides, local)` starts a match,
|
||||
`Game::take_orders()` hands the local orders to the server, `Game::receive_turn(cmds)` applies a confirmed
|
||||
turn (five steps) and `Game::checksum()` compares the worlds of the clients - a peer with a different number
|
||||
is reported once (`net.desync`). A client without the next turn stands still: that is the "pause while
|
||||
missing" rule, and the tests run two clients of one match side by side.
|
||||
- Savegames, tests and the standalone file are unchanged: `cargo test --release` covers the command path
|
||||
(including "the same actions on both paths build the same world").
|
||||
|
||||
@@ -58,9 +63,8 @@ per turn. Fog of war, particles and the camera are local and not part of the sha
|
||||
| E | Alliances and coop rules, AI masters for free and abandoned slots | planned |
|
||||
| F | Coop campaign: 20 missions with story (EN/DE) | planned |
|
||||
|
||||
Still open on the way to C: the turn/turn-boundary client loop, the state checksum, and heroes and
|
||||
alliances for the new sides (today the hero gate path always leads to side 0's core, and 2/3 are the
|
||||
rivals' sides in free play).
|
||||
Still open on the way to C: heroes and alliances for the new sides (today the hero gate path always leads to
|
||||
side 0's core, and in free play 2 and 3 are the rivals' sides), and what a match leaves out of savegames.
|
||||
|
||||
## Masters and sides
|
||||
|
||||
|
||||
Reference in new issue
Block a user