Skip to content

Add draft and sealed modes to online multiplayer (mobile)#10806

Draft
MostCromulent wants to merge 6 commits into
Card-Forge:masterfrom
MostCromulent:NetworkPlay/mobile-draft-sealed
Draft

Add draft and sealed modes to online multiplayer (mobile)#10806
MostCromulent wants to merge 6 commits into
Card-Forge:masterfrom
MostCromulent:NetworkPlay/mobile-draft-sealed

Conversation

@MostCromulent
Copy link
Copy Markdown
Contributor

@MostCromulent MostCromulent commented May 29, 2026

Phase 1B of #10429: Mobile follow-up to #10474 (desktop draft/sealed).

Extends the online draft/sealed feature to forge-gui-mobile. The lobby → draft → deckbuild → match workflow mirrors the desktop implementation in #10474 (Constructed/Limited mode, host event wizard, simultaneous draft with AI fill, sealed pool generation, metadata-tagged decks, post-event deck filtering) and reuses the same server-side draft logic and wire formats — no protocol changes. This PR is the mobile UI realisation of that flow.

Screenshot 2026-05-30 092256 Screenshot 2026-05-30 092307

Mobile UI

  • Lobby. A Constructed / Limited mode dropdown, the host event wizard (Draft/Sealed → pool type → block/set → pick timer + disconnect grace), an active-event panel with an "only allow decks from this event" toggle and a dismiss-X, and a read-only mode dropdown mirrored to clients.
  • Draft picker. A full-screen screen with Pack / Main / Side tabs, the deck header, and a draft-log dropdown. A libgdx-native countdown rope drains across the top of the pack tab beside a neighbor pick-direction strip (left / you / right names, pack queue-depth icons, pass-direction arrows). A Chat tab opens the lobby chat with the same unread-message badge as the in-match chat.
  • Deckbuilding & load. Completed pools open in the deck editor and are reachable later from the Draft/Sealed Decks lists, with a guard preventing gauntlet/AI play.

Implementation

  • The mobile lobby is the sole registered IDraftEventHandler and routes per-seat events into the active draft screen; host picks go through ServerGameLobby.handleDraftPick, client picks through FGameClient.send.
  • NetworkDraftingProcessScreen extends FDeckEditor; a pushed-pack DraftPackPage subclass accepts packs without binding to a local BoosterDraft.
  • Pool delivery tags decks via the cross-platform helpers and binds the editor to FModel.getDecks().getNetworkEventDecks(), so edits round-trip through the same storage desktop uses.
  • The chat tab's unread badge is shared with the in-match chat via a small IUnreadIndicator interface and FMenuTab.drawUnreadBadge.
  • Server-side draft logic and all wire formats are unchanged from the desktop branch.

🤖 Generated with Claude Code

MostCromulent and others added 2 commits May 30, 2026 07:45
DraftPackArrivedEvent and the three other draft callbacks reached CLobby
via DraftForwardingLobbyListener → VLobby → CLobby, with the four method
signatures restated on ILobbyListener, ILobbyView, and the forwarder
adapter. The new IDraftEventHandler interface owns the signatures in
one place and exposes a dispatch(NetEvent) default that consolidates the
instanceof routing previously duplicated across FServerManager and
FGameClient. CLobby implements it directly; FServerManager and
FGameClient get a separate optional draftHandler slot wired by
NetConnectUtil. The forwarder, the four pass-throughs on VLobby, and the
four default methods on each of the two listener interfaces are deleted.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends the desktop network draft/sealed feature to forge-gui-mobile. The mobile
lobby gains a Constructed/Limited mode dropdown (read-only and host-synced on
clients), a Set Up Event button that walks the host through the same event-type /
pool-type / block-or-set / pick-timer cascade desktop uses, three mode-aware
action buttons (Set Up Event / Start Draft|Generate Pools / Start Match), an
event panel summarising the active event, an "only allow decks from this event"
conformance toggle, and a dismiss-X for clearing the active event. The deck
chooser switches to a new NET_EVENT_DECK category in Limited mode.

Picks happen on a new NetworkDraftingProcessScreen extending FDeckEditor so the
Pack / Main / Side tab layout, deck header, and draft-log dropdown match the
offline draft screen. A custom DraftPackPage subclass accepts pushed packs
without binding to a local BoosterDraft; a libgdx-native DraftTimerRope and
countdown sit atop the pack tab, with a neighbor pick-direction strip showing
left/you/right names, pack queue-depth icons, and pass-direction arrows. A Chat
button in the draft header opens a VChat dropdown wired to the lobby chat, with
the same unread-message badge as the in-match chat (shared via a new
IUnreadIndicator interface and FMenuTab.drawUnreadBadge).

The lobby is the sole registered IDraftEventHandler and routes per-seat events
into the active draft screen; host picks send via ServerGameLobby.handleDraftPick
directly while client picks go through FGameClient.send. Pool delivery (sealed
start and draft completion) tags the deck via cross-platform helpers and opens a
deck editor bound to FModel.getDecks().getNetworkEventDecks() so edits round-trip
through the same storage desktop uses. LoadDraftScreen and LoadSealedScreen
surface event decks with a guard preventing gauntlet/AI play.

Server-side draft logic and all wire formats are unchanged from the desktop branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MostCromulent
Copy link
Copy Markdown
Contributor Author

MostCromulent commented May 30, 2026

This is built on top of #10756. That should be merged first.

#10745 is probably redundant if this merges first, though I think that PR may still be usefully adapted to more loudly broadcast version mismatch warnings.

tool4ever and others added 4 commits May 30, 2026 07:20
Bring the mobile online lobby to parity with desktop for reusing past
draft/sealed pools and locating event decks:

- Set Up Event now offers "Create new" / "Load past event" when saved
  network-event decks exist. Loading lists past events newest first and
  selects one as the active event with deck conformance on, mirroring the
  desktop flow.
- Fix the bottom event panel staying hidden after loading a past event:
  the visibility check ignored the active event id, so the conformance
  checkbox appeared but the event details did not.
- Add the "Online Draft/Sealed Decks" category to the lobby deck chooser
  so drafted/sealed pools are selectable there, not just in the Deck
  Manager.
- Rename the network event deck category to "Online Draft/Sealed Decks"
  so the Deck Manager and the lobby dropdown read consistently.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Drafting Related to Draft(ing) game mechanic Mobile Netplay

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants