127#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:43
void DestroyWorld(WorldHash worldHash)
destroy a world
Definition gameserver.cc:587
bool HasStarted() const
has the game world already started
Definition gameserver.cc:176
void SetCmdLineArgs(const Util::CommandLineArgs &a)
set command line args
Definition gameserver.h:142
virtual void NotifyGameLoad()
call OnLoad on all game features
Definition gameserver.cc:422
virtual __DeclareClass(GameServer) __DeclareSingleton(GameServer) public ~GameServer()
destructor
Definition gameserver.cc:35
virtual void OnEndFrame()
trigger actions after rendering the game world
Definition gameserver.cc:310
virtual void NotifyBeforeCleanup()
call OnBeforeCleanup on all game features
Definition gameserver.cc:401
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:105
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:140
virtual bool Open()
Initialize the game server object.
Definition gameserver.cc:60
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:125
virtual void NotifyGameSave()
call OnSave on all game features
Definition gameserver.cc:454
void RemoveGameFeature(const Ptr< FeatureUnit > &feature)
remove game feature
Definition gameserver.cc:122
virtual void Stop()
Stop the game world.
Definition gameserver.cc:186
Util::Array< Ptr< FeatureUnit > > const & GetGameFeatures() const
access to all attached features units
Definition gameserver.cc:518
Util::CommandLineArgs args
Definition gameserver.h:124
bool isOpen
Definition gameserver.h:122
bool isStarted
Definition gameserver.h:123
const Util::CommandLineArgs & GetCmdLineArgs() const
get command line args
Definition gameserver.h:151
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:567
virtual void Close()
Close the game server object.
Definition gameserver.cc:89
virtual void OnBeginFrame()
trigger actions before rendering the game world
Definition gameserver.cc:211
virtual void OnFrame()
trigger the game world
Definition gameserver.cc:274
virtual void NotifyBeforeLoad()
call OnBeforeLoad on all game features
Definition gameserver.cc:380
A container of entities, their components, and processors.
Definition world.h:70
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
Resolves local hierarchical transforms into the mandatory world transform components.
Definition graphicsmanager.h:67
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:114
uint numWorlds
Definition gameserver.h:116
Util::HashTable< WorldHash, WorldId, 32, 1 > worldTable
Definition gameserver.h:118
World * worlds[32]
Definition gameserver.h:115
unsigned int uint
Definition types.h:33