15 static constexpr int64_t OpenAstraStorageVersion = 0x0000000000000001ULL;
22 static std::shared_ptr<GameManager> game_manager;
24 GameManager(
bool undump =
false );
27 std::shared_ptr<Player> createPlayer(
const std::string& player_name );
28 std::shared_ptr<Player> getPlayerByName(
const std::string& player_name );
29 std::shared_ptr<Player> getPlayerById(
ObjectId id );
31 std::shared_ptr<StarSystem> getStarsystemById(
ObjectId id );
34 virtual void tick(
double tick_s,
double total_time_s );
36 double getCurrentTime()
const;
38 std::map<ObjectId, std::shared_ptr<Player>> _players;
41 std::map<ObjectId, std::shared_ptr<StarSystem>> _starsystems;
45 virtual void _finalizeUndump() final;
46 virtual
void _finalizeDump() final;
static std::shared_ptr< GameObject > createFromDump(ObjectId id, const std::string &type)
top level disk serialization identifier
Definition gamemanager.cpp:9
static constexpr char OpenAstraCategory[]
serialization version
Definition gamemanager.h:17
static constexpr char OpenAstraType[]
top level disk serialization identifier
Definition gamemanager.h:18
GameObject(const std::string &category, ObjectId id, const std::string &type)
Create a GameObject object.
Definition gameobject.cpp:38
const std::string & type() const
return the type (ship_xxx, station_xxx, planet_xxx...)
Definition gameobject.h:213
Definition starsystem.h:13