feat(gamemode): run the queue engine per gamemode - #820
Open
garrappachc wants to merge 2 commits into
Open
garrappachc wants to merge 2 commits into
garrappachc wants to merge 2 commits into
Conversation
Thread `gamemode` through the whole queue engine so each enabled gamemode runs an independent queue: state/slots/map-vote/friendship reads and writes are filtered by gamemode, the mutex and the ready/launch driver are keyed by gamemode, and one queue is initialised per enabled gamemode at boot. Queue events now carry the gamemode they belong to, and the ready-up/unready tasks carry it in their args. Joining still vacates any slot the player holds in another gamemode, keeping the one-queue-at-a-time rule. The websocket gateway boundary still passes the default gamemode (routing that supplies the real gamemode lands with the queue paths PR); behaviour is unchanged for a single-gamemode instance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Playwright test resultsDetails
|
garrappachc
commented
Aug 27, 2026
…helper kick() no longer takes a gamemode: a player is kicked from whichever queue they're in (grouped by gamemode internally), which also drops the slot lookups the ban/disconnect/replace callers had to do. Extract the duplicated per-gamemode debounce map (auto-cleanup-friendships + launch-new-game) into a `debounceLazy` helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the multi-gamemode (5.0.0) stack. Base: #819.
Why
Makes the queue engine operate per gamemode so an instance can run more than one queue at once (6v6/9v9/ultiduo/bball) — the first PR in the stack that can actually drive >1 queue.
What
gamemodethreaded through the queue engine (queue/*,queue-auto/*): state, slots, map-vote, friendships and their reads/writes are now filtered by gamemode.auto-update-queue-state);queue:readyUpTimeout/queue:unreadytasks carry the gamemode in their args.ENABLED_GAMEMODESentry at boot; game launch/reset scoped to the launching queue's gamemode.\n- Queue events (queue/slots:updated,queue/state:updated,queue/mapOptions:reset,queue/mapVoteResults:updated,queue/friendship:*) now carrygamemode.\n- Joining still vacates any slot the player holds in another gamemode (one-queue-at-a-time).\n\n## Boundary / scope\n- The websocket gateway and the/-page broadcast still pass the default gamemode; the real routed gamemode arrives with the queue-paths PR. Behaviour is unchanged for a single-gamemode instance.\n- The shared map pool stays global (a separate concern); only the per-queue vote options/votes are partitioned here.\n\nNet-newtscerrors: 0. Unit suite green without.env(mirrors CI unit job).