Co-op matches of editor campaigns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0966e3318f
commit
abe01ff23e
13 files changed
+394
-44
No files matched your search
@@ -69,6 +69,17 @@ per turn. Fog of war, particles and the camera are local and not part of the sha
|
||||
by the simplified rival AI on every client, so they stay deterministic.
|
||||
- **Co-op** (`Game::coop`): the master sides are allies against the heroes; allied creatures never target each
|
||||
other, allied ground does not block claims. Co-op campaign matches use `campaign::start_coop_mission`.
|
||||
- **Editor campaigns in co-op**: on the Match page the host can switch from the built-in campaign to the
|
||||
campaign last opened in the editor (`Menu::campaign_doc`) and pick one of its missions that fits co-op
|
||||
(`campaign::is_editor_coop_mission`: map at least 72x72, a goal besides rival masters). The create message
|
||||
carries the whole campaign (`"doc"`, the `CampaignDoc` JSON, up to `MAX_WS_MESSAGE` = 40 MB per WebSocket
|
||||
message); the relay keeps it in the room and adds it to the `start` message (room updates only show
|
||||
`"editor": true`). Every client builds the mission with `campaign::start_editor_coop_mission(doc, i, seed)` from
|
||||
the room's shared seed (rival masters of the map and the Rivals goal are left out, like in built-in co-op),
|
||||
then the usual co-op setup. Block scripts run from side 0 in the fixed step. When the mission ends, the match
|
||||
ends and the players go back to the lobby; there is no branching to a next mission and no progress is stored.
|
||||
- **Shared simulation side**: the shared part of a step (waves, units, towers, rivals, dwarves) runs with the
|
||||
first master switched in on every client; only the end check and the fog use the local master.
|
||||
|
||||
## Steps
|
||||
|
||||
|
||||
Reference in new issue
Block a user