131#if NEBULA_ENABLE_PROFILING
The main programming interface for the Game Subsystem.
The common base class of Nebula.
Definition refcounted.h:45
__DeclareClass(RefCounted)
The game server setups and runs the game world.
Definition gameserver.h:43
void DestroyWorld(WorldHash worldHash)
destroy a world
Definition gameserver.cc:607
bool HasStarted() const
has the game world already started
Definition gameserver.cc:181
void SetCmdLineArgs(const Util::CommandLineArgs &a)
set command line args
Definition gameserver.h:146
virtual void NotifyGameLoad()
call OnLoad on all game features
Definition gameserver.cc:422
virtual void OnEndFrame()
trigger actions after rendering the game world
Definition gameserver.cc:315
struct Game::GameServer::State state
virtual void CleanupWorld(World *)
cleanup the game world
Definition gameserver.cc:540
void AttachGameFeature(const Ptr< FeatureUnit > &feature)
add game feature
Definition gameserver.cc:110
World * CreateWorld(WorldHash hash)
create a world. The game server handles all worlds
Definition gameserver.cc:550
virtual bool Start()
Start the game world, called after loading has completed.
Definition gameserver.cc:145
virtual bool Open()
Initialize the game server object.
Definition gameserver.cc:65
bool IsFeatureAttached(const Util::String &stringName) const
is feature attached
Definition gameserver.cc:500
virtual void SetupEmptyWorld(World *)
setup an empty game world
Definition gameserver.cc:528
Util::Array< Ptr< FeatureUnit > > gameFeatures
Definition gameserver.h:129
virtual void NotifyGameSave()
call OnSave on all game features
Definition gameserver.cc:454
virtual void NotifyBeforeCleanup(World *world)
call OnBeforeCleanup on all game features for the world which is cleaned up
Definition gameserver.cc:406
void RemoveGameFeature(const Ptr< FeatureUnit > &feature)
remove game feature
Definition gameserver.cc:127
virtual void Stop()
Stop the game world.
Definition gameserver.cc:191
static const uint MaxWorlds
The number of world slots.
Definition gameserver.h:114
Util::Array< Ptr< FeatureUnit > > const & GetGameFeatures() const
access to all attached features units
Definition gameserver.cc:518
Util::CommandLineArgs args
Definition gameserver.h:128
bool isOpen
Definition gameserver.h:126
bool isStarted
Definition gameserver.h:127
const Util::CommandLineArgs & GetCmdLineArgs() const
get command line args
Definition gameserver.h:155
void RenderDebug()
call when debug gui and primitives are up for rendering
Definition gameserver.cc:486
World * GetWorld(WorldHash worldHash)
get a world by hash
Definition gameserver.cc:585
virtual void Close()
Close the game server object.
Definition gameserver.cc:94
virtual void OnBeginFrame()
trigger actions before rendering the game world
Definition gameserver.cc:216
virtual void OnFrame()
trigger the game world
Definition gameserver.cc:279
virtual void NotifyBeforeLoad()
call OnBeforeLoad on all game features
Definition gameserver.cc:385
A container of entities, their components, and processors.
Definition world.h:92
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:61
A universal cmd line argument parser.
Definition commandlineargs.h:24
Organizes key/value pairs by a hash code.
Definition hashtable.h:42
Nebula's universal string class.
Definition string.h:50
#define _declare_timer(timer)
Definition debugtimer.h:35
Game::EditorState.
Definition graphicsmanager.h:66
uint32_t WorldId
Definition entity.h:28
#define __DeclareSingleton(type)
Definition osxsingleton.h:24
contains internal state and world management
Definition gameserver.h:118
uint numWorlds
Definition gameserver.h:120
Util::HashTable< WorldHash, WorldId,(int) MaxWorlds, 1 > worldTable
Definition gameserver.h:122
World * worlds[MaxWorlds]
Definition gameserver.h:119
unsigned int uint
Definition types.h:41