132#if NEBULA_ENABLE_PROFILING
The main programming interface for the Game Subsystem.
The common base class of Nebula.
Definition refcounted.h:38
The game server setups and runs the game world.
Definition gameserver.h:45
void DestroyWorld(WorldHash worldHash)
destroy a world
Definition gameserver.cc:567
bool HasStarted() const
has the game world already started
Definition gameserver.cc:180
void SetCmdLineArgs(const Util::CommandLineArgs &a)
set command line args
Definition gameserver.h:147
virtual void NotifyGameLoad()
call OnLoad on all game features
Definition gameserver.cc:402
virtual __DeclareClass(GameServer) __DeclareSingleton(GameServer) public ~GameServer()
destructor
Definition gameserver.cc:36
virtual void OnEndFrame()
trigger actions after rendering the game world
Definition gameserver.cc:300
virtual void NotifyBeforeCleanup()
call OnBeforeCleanup on all game features
Definition gameserver.cc:381
struct Game::GameServer::State state
virtual void CleanupWorld(World *)
cleanup the game world
Definition gameserver.cc:520
void AttachGameFeature(const Ptr< FeatureUnit > &feature)
add game feature
Definition gameserver.cc:109
World * CreateWorld(WorldHash hash)
create a world. The game server handles all worlds
Definition gameserver.cc:530
virtual bool Start()
Start the game world, called after loading has completed.
Definition gameserver.cc:144
virtual bool Open()
Initialize the game server object.
Definition gameserver.cc:63
bool IsFeatureAttached(const Util::String &stringName) const
is feature attached
Definition gameserver.cc:480
virtual void SetupEmptyWorld(World *)
setup an empty game world
Definition gameserver.cc:508
Util::Array< Ptr< FeatureUnit > > gameFeatures
Definition gameserver.h:130
virtual void NotifyGameSave()
call OnSave on all game features
Definition gameserver.cc:434
void RemoveGameFeature(const Ptr< FeatureUnit > &feature)
remove game feature
Definition gameserver.cc:126
virtual void Stop()
Stop the game world.
Definition gameserver.cc:190
Util::Array< Ptr< FeatureUnit > > const & GetGameFeatures() const
access to all attached features units
Definition gameserver.cc:498
Util::CommandLineArgs args
Definition gameserver.h:129
bool isOpen
Definition gameserver.h:127
bool isStarted
Definition gameserver.h:128
const Util::CommandLineArgs & GetCmdLineArgs() const
get command line args
Definition gameserver.h:156
void RenderDebug()
call when debug gui and primitives are up for rendering
Definition gameserver.cc:466
World * GetWorld(WorldHash worldHash)
get a world by hash
Definition gameserver.cc:547
virtual void Close()
Close the game server object.
Definition gameserver.cc:93
virtual void OnBeginFrame()
trigger actions before rendering the game world
Definition gameserver.cc:215
virtual void OnFrame()
trigger the game world
Definition gameserver.cc:267
virtual void NotifyBeforeLoad()
call OnBeforeLoad on all game features
Definition gameserver.cc:360
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
A universal cmd line argument parser.
Definition commandlineargs.h:24
Organizes key/value pairs by a hash code.
Definition hashtable.h:42
#define _declare_timer(timer)
Definition debugtimer.h:35
Game::EditorState.
Definition orientation.h:7
uint32_t WorldId
Definition entity.h:28
#define __DeclareSingleton(type)
Definition osxsingleton.h:24
#define __DeclareClass(type)
contains internal state and world management
Definition gameserver.h:116
uint numWorlds
Definition gameserver.h:118
Ptr< MemDb::Database > templateDatabase
Contains all templates.
Definition gameserver.h:123
Util::HashTable< WorldHash, WorldId, 32, 1 > worldTable
Definition gameserver.h:120
World * worlds[32]
Definition gameserver.h:117
Nebula's universal string class.
Definition string.h:50
unsigned int uint
Definition types.h:31