13#include <entt/entity/entity.hpp>
14#include <unordered_map>
28 bool init(
const char* addr, Uint16 port,
int tickRateHz = 128);
39 void eventHandler(
Event event);
44 void tick(
float dt, Uint64 nextTick);
48 void initNewPlayerEntity(
ClientId clientId);
52 void deletePlayerEntity(
ClientId clientId);
57 std::unordered_map<ClientId, entt::entity> clientEntities;
Network client identifier component for multiplayer entities.
Shared ECS registry type alias for the game engine.
entt::registry Registry
Shared ECS registry type alias.
Definition Registry.hpp:11
TCP game server that accepts clients and dispatches incoming packets.
A single gameplay event produced by network input processing.
Definition Event.hpp:10
Definition MatchController.hpp:10
Top-level server game loop.
Definition ServerGame.hpp:21
void shutdown()
Signal the loop to stop and release all resources.
Definition ServerGame.cpp:68
void run()
Block and run the game loop until shutdown() is called.
Definition ServerGame.cpp:40
bool init(const char *addr, Uint16 port, int tickRateHz=128)
Bind to the given address and port, spawn test entities.
Definition ServerGame.cpp:28
TCP stream socket — receives client packets and echoes them back.
Definition Server.hpp:24
Associates an entity with a connected network client.
Definition ClientId.hpp:10