Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
Loading...
Searching...
No Matches
bomberman::server::ServerState Struct Reference

Long-lived authoritative server state shared across receive and simulation paths. More...

#include <ServerState.h>

Public Attributes

ENetHost * host = nullptr
 Non-owning ENet host for this session.
 
ServerPhase phase = ServerPhase::Lobby
 Current high-level server flow phase.
 
uint32_t serverTick = 0
 Authoritative simulation tick advanced by simulateServerTick().
 
uint32_t inputLeadTicks = sim::kDefaultServerInputLeadTicks
 
uint32_t snapshotIntervalTicks = sim::kDefaultServerSnapshotIntervalTicks
 
bool powersEnabled = true
 Round powerups are seeded and replicated.
 
std::array< std::optional< PeerSession >, kServerPeerSessionCapacitypeerSessions {}
 Stable-address live peer sessions indexed by ENet incoming peer id.
 
std::array< std::optional< PlayerSlot >, net::kMaxPlayersplayerSlots {}
 Active accepted-player metadata keyed by player id. See PlayerSlot.
 
std::array< std::optional< DisconnectedPlayerReclaim >, net::kMaxPlayersdisconnectedPlayerReclaims {}
 Last disconnected occupant per player id for bounded lobby-only reconnect reclaim.
 
std::array< std::optional< MatchPlayerState >, net::kMaxPlayersmatchPlayers {}
 Stable-address active in-match state keyed by player id.
 
std::array< std::optional< BombState >, kServerBombCapacitybombs {}
 Active bombs for the current round.
 
std::array< std::optional< PowerupState >, kServerPowerupCapacitypowerups {}
 Hidden and revealed round powerups for the current or next match.
 
sim::TileMap tiles {}
 Collision map shared by all server-side movement steps.
 
std::array< uint8_t, net::kMaxPlayersplayerIdPool {}
 Sorted free-list of available player ids.
 
uint8_t playerIdPoolSize = 0
 
std::optional< uint32_t > fixedMapSeedOverride {}
 Fixed map seed reused for every round when started with --seed.
 
uint32_t mapSeed = 0
 
uint32_t currentMatchId = 0
 Current match identifier, or 0 while idle in the lobby.
 
uint32_t nextMatchId = 1
 
uint32_t currentLobbyCountdownPlayerMask = 0
 Bitmask of players currently participating in the lobby countdown.
 
uint32_t currentLobbyCountdownDeadlineTick = 0
 
uint8_t currentLobbyCountdownLastBroadcastSecond = 0
 
uint32_t currentMatchPlayerMask = 0
 Bitmask of player ids participating in the current round start or active round.
 
uint32_t currentMatchLoadedMask = 0
 
uint32_t currentMatchStartDeadlineTick = 0
 
uint32_t currentMatchGoShowTick = 0
 
uint32_t currentMatchUnlockTick = 0
 
uint32_t currentEndOfMatchReturnTick = 0
 
std::optional< uint8_t > roundWinnerPlayerId {}
 Winner of the current or most recent round, if any.
 
bool roundEndedInDraw = false
 
net::NetDiagnostics diag
 Diagnostics recorder for this session.
 

Detailed Description

Long-lived authoritative server state shared across receive and simulation paths.

The state is layered in three parts:

  • live transport sessions
  • accepted lobby/player-seat metadata
  • active round flow and authoritative match state

The documentation for this struct was generated from the following file: