Skip to main content

Ready Check & Game Start

How a party goes from the menu into a match, and back.

Game Server State

The whole flow is driven by one lobby data value, E_GameServerState, written under the Game Server State Key from DA_PM_Settings:

NoServer → Starting → Live → Shutdown → NoServer

Read/write it with the SetGameServerState / GetGameServerState utility functions.

Step 1: Ready Check

Each member presses Ready in WB_PartyMenu, which calls PartyReadyCheck on their Party Manager:

  1. The local ready status is toggled and written to lobby member data under the Ready Status Key.
  2. Every client counts ready members from lobby member data and broadcasts:
    • OnPartyMemberReadyStatusChange for per-member UI updates (pedestal turns to the Ready state)
    • OnPartyReadyCheckUpdate for the overall counter (e.g. "2/4 ready")
  3. When all members are ready, the host proceeds to start the game server.

Step 2: Host Starts the Server (Init Game Server)

Host only:

  1. Resolves the selected map from DA_PM_SettingsAll Available Maps using the Maps Key value in lobby data.
  2. Sets Game Server State = Starting and writes its own Steam ID as the Lobby Game Server.
  3. Resets everyone's ready status (so returning to the menu later starts clean).
  4. Opens the level as a listen server (Open Level with soft world reference + listen option).
  5. Shows WB_GameInitialization overlay through Game Initialization Widget.

TimeOutDisbandAttempt runs as a failsafe: if the server never reaches Live, the attempt is aborted and Reset GameServer returns the state to NoServer.

Step 3: Clients Join

On each non-host client, HandleOnLobbyDataUpdate sees the server state change:

  1. Join Game Server (if available) reads the host's Steam ID from Lobby Game Server data.
  2. Delay Joining Clients staggers connections slightly so all clients don't hit the fresh server at once.
  3. The client travels with the Steam Sockets console command (open steam.<host-id64>).

In the match level, the game runs as a normal UE listen-server session: BP_SPM_GamePlayerController (Party Manager in Game mode), BP_SPM_MatchGamemode, replicated BP_GameCharacter pawns.

Step 4: Leaving the Match

From WB_EscapeMenu:

  • Leave alone: the client runs Leave Game Server and returns to PartyMenu, rejoining the party lobby (the lobby ID survived in BP_SPM_Gameinstance).
  • Leave with party (host): the host sets Game Server State = Shutdown; every member sees the update and leaves together. Handle Staying as Party After GameServer keeps the party lobby alive so everyone lands back in the same menu party.

Rejoin System

Because the party lobby persists while the match runs (state = Live), a disconnected player can rejoin: on entering the menu, if the lobby's game server state is Live, the client offers/executes Join Game Server (if available) again instead of idling in the menu.

PIE Note

Steam is unavailable in PIE, so PIE Mode Gameserver Init provides a shortcut path for testing map travel without lobbies. Full flow requires Standalone (see Getting Started).