|
|
Bomberman Multiplayer
Authoritative multiplayer networking layer for Bomberman.
|
Public Member Functions | |
| Game (const std::string &windowName, int windowWidth, int windowHeight, net::NetClient *inNetClient=nullptr, uint16_t serverPort=net::kDefaultServerPort, bool mute=false, MultiplayerClientConfig multiplayerConfig={}) | |
| Constructs game runtime and initializes SDL subsystems. | |
| ~Game () | |
| Releases runtime resources and shuts down SDL subsystems. | |
| void | run () |
| Runs the main loop until stop() is requested. | |
| void | stop () |
| Requests the main loop to stop. | |
| int | getWindowWidth () const |
| Returns current window width in pixels. | |
| int | getWindowHeight () const |
| Returns current window height in pixels. | |
| SDL_Renderer * | getRenderer () const |
| Returns the SDL renderer. | |
| SceneManager * | getSceneManager () const |
| Returns the scene manager. | |
| AssetManager * | getAssetManager () const |
| Returns the asset manager. | |
| net::NetClient * | getNetClient () const |
| Returns the network client, or nullptr if not in multiplayer mode. | |
| bool | tryGetLatestSnapshot (net::MsgSnapshot &out) const |
Fills out with the most recent server snapshot and returns true. | |
| uint16_t | getServerPort () const |
| Returns the server port (from CLI or default). | |
| const MultiplayerClientConfig & | getMultiplayerClientConfig () const |
| Returns the multiplayer client configuration used for this run. | |
| bool | isPredictionEnabled () const |
| Returns true when local multiplayer prediction is enabled. | |
| bool | isRemoteSmoothingEnabled () const |
| Returns true when remote smoothing/interpolation is enabled. | |
| void | suppressBombInputUntilReleased () |
| Suppresses bomb input until the space key is released once. | |
| void | disconnectNetClientIfActive (bool blockUntilComplete=true) |
| Disconnects the multiplayer client if one is active. | |
| bomberman::Game::Game | ( | const std::string & | windowName, |
| int | windowWidth, | ||
| int | windowHeight, | ||
| net::NetClient * | inNetClient = nullptr, |
||
| uint16_t | serverPort = net::kDefaultServerPort, |
||
| bool | mute = false, |
||
| MultiplayerClientConfig | multiplayerConfig = {} |
||
| ) |
Constructs game runtime and initializes SDL subsystems.
| windowName | Window title. |
| windowWidth | Initial window width. |
| windowHeight | Initial window height. |
| inNetClient | Optional multiplayer client (not owned). |
| serverPort | Server port from CLI or default config. |
| mute | Starts the client with all audio output silenced when true. |
| multiplayerConfig | Startup config for client-side netcode behavior. |
| bool bomberman::Game::tryGetLatestSnapshot | ( | net::MsgSnapshot & | out | ) | const |
Fills out with the most recent server snapshot and returns true.
Returns false if not in multiplayer mode, or not yet connected.