|
|
Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
|
Dedicated authoritative server runtime, session flow, and fixed-tick match simulation. More...
Files | |
| file | ServerBombs.cpp |
| Authoritative server-side bomb placement, explosion, and lifecycle logic. | |
| file | ServerBombs.h |
| Authoritative server-side bomb placement, explosion, and lifecycle helpers. | |
| file | ServerControlHandlers.cpp |
| Authoritative server control-message handling and lobby-state broadcast. | |
| file | ServerEvents.cpp |
| Dedicated-server ENet connect, receive, and disconnect event servicing. | |
| file | ServerEvents.h |
| Dedicated-server ENet event servicing entry point. | |
| file | ServerFlow.cpp |
| Authoritative server-flow phase orchestration. | |
| file | ServerFlow.h |
| Authoritative lobby-to-match flow helpers. | |
| file | ServerFlowInternal.h |
| Private helpers shared by authoritative server-flow implementation files. | |
| file | ServerHandlers.cpp |
| Authoritative server receive-path validation and dispatcher entry point. | |
| file | ServerHandlers.h |
| Authoritative server receive-path entry point and shared handler declarations. | |
| file | ServerInputHandlers.cpp |
| Authoritative server gameplay-input receive handling. | |
| file | ServerLobbyFlow.cpp |
| Authoritative lobby, countdown, bootstrap, and match-start helpers. | |
| file | ServerMatchFlow.cpp |
| Authoritative in-match result and return-to-lobby helpers. | |
| file | ServerPowerups.cpp |
| Authoritative round powerup placement and reveal logic. | |
| file | ServerPowerups.h |
| Authoritative hidden/revealed round powerup helpers. | |
| file | ServerSession.cpp |
| Authoritative server session lifecycle, peer-session binding, and player-slot management. | |
| file | ServerSimulation.cpp |
| Authoritative fixed-tick simulation, corrections, and snapshot broadcast. | |
| file | ServerSnapshot.cpp |
| Authoritative snapshot cadence and connected-client snapshot construction. | |
| file | ServerSnapshot.h |
| Authoritative snapshot cadence and connected-client snapshot construction helpers. | |
| file | ServerState.h |
| Authoritative server state model, lifecycle helpers, and fixed-tick simulation API. | |
Dedicated authoritative server runtime, session flow, and fixed-tick match simulation.
This is the gameplay-truth side of the multiplayer architecture.
It owns:
The important design boundary: the server owns gameplay truth, while the client only sends intent and presents authoritative results.
The server is responsible for deciding what actually happened in shared gameplay state.
That includes who is connected, which players are accepted into the lobby, when a round starts and ends, how the match advances on each simulation tick, and what authoritative state is replicated back to clients.
This page focuses on that ownership boundary and the high-level server split. The packet contract itself is explained in Networking.
The server distinguishes transport session state, accepted lobby state, and active in-match state instead of collapsing them into one structure.
| Slice | What it owns | Representative files |
|---|---|---|
| State and Session | Connected peers, accepted seats, active match player state | Server/ServerState.h, Server/ServerSession.cpp |
| Receive and Dispatch | ENet events, packet validation, control/input routing | Server/ServerEvents.cpp, Server/ServerHandlers.cpp, Server/ServerInputHandlers.cpp |
| Flow Control | Lobby countdown, match bootstrap, round start/end, return to lobby | Server/ServerFlow.cpp, Server/ServerLobbyFlow.cpp, Server/ServerMatchFlow.cpp |
| Match Simulation | Fixed-tick gameplay state, snapshots, corrections, reliable gameplay events | Server/ServerSimulation.cpp, Server/ServerSnapshot.cpp, Server/ServerBombs.cpp, Server/ServerPowerups.cpp |
This split keeps the server readable: one layer answers who is connected, one answers what arrived, one answers which phase the server is in, and one answers what happens on each authoritative tick.
The server owns the phase machine for lobby readiness, bootstrap, active match, and end-of-round return to lobby.
Relevant code: