|
| | Game (std::uint16_t port=4242) |
| | Creates the game and its network server.
|
| |
| void | onLoad (rtk::EngineContext &context) |
| | Registers components, loads blueprints, adds the systems and starts the network server.
|
| |
| void | onUpdate (rtk::EngineContext &context, float dt) |
| | Updates the active scene.
|
| |
| void | onUnload (rtk::EngineContext &context) |
| | Exits the scene and stops the network server.
|
| |
| bool | shouldContinue () const |
| | Tells the engine whether to keep running.
|
| |
|
void | incrementServerTick () |
| | Advances the server tick by one.
|
| |
| std::uint32_t | getServerTick () const |
| | Returns the server tick.
|
| |
| std::size_t | getPlayerCount () const |
| | Returns the number of connected players.
|
| |
| const std::unordered_map< std::uint32_t, std::size_t > & | getPlayers () const |
| | Returns the connected players.
|
| |
| bool | isGameActive () const |
| | Tells whether a round is being played.
|
| |
| void | setGameActive (bool active) |
| | Marks a round as started or stopped.
|
| |
|
void | resetGameState () |
| | Forgets every player and resets the tick and round state.
|
| |
Authoritative game simulation run by the server.
Owns the network server, the lobby and in game scenes, and the player entities, and replicates the world to every connected client.