Nebula
Loading...
Searching...
No Matches
Game Namespace Reference

Namespaces

namespace  TimeManager
 Singleton object which manages the current game time.
 

Classes

struct  AngularVelocity
 
struct  BlueprintId
 
class  BlueprintManager
 Loads the 'data:tables/blueprint.json' file and subsequently sets up categories based on the blueprints in the entity manager. More...
 
struct  ComponentDecayBuffer
 Contains data for components flagged with COMPONENTFLAG_DECAY, that has been deleted this frame. More...
 
class  ComponentInspection
 Component inspection functions. More...
 
class  ComponentInterface
 These are registered to the attribute registry so that we can add more functionality to attributes. More...
 
struct  ComponentRegisterInfo
 Used for registering component types to the game world. More...
 
class  ComponentSerialization
 Component serialization functions. More...
 
struct  Dataset
 A dataset that contains views into category tables. More...
 
struct  Entity
 An entity is essentially just an Id with some utility functions attached. More...
 
struct  EntityCreateInfo
 
struct  EntityMapping
 Maps an entity to a table and instance id. More...
 
class  EntityPool
 Generation pool. More...
 
struct  EntityTableCreateInfo
 
class  FeatureUnit
 A FeatureUnit is an encapsulated feature which can be added to an application. More...
 
class  FilterBuilder
 
class  FrameEvent
 
class  FramePipeline
 
class  GameServer
 The game server setups and runs the game world. More...
 
struct  ManagerAPI
 A Manager is just a bundle of function pointers to static or global functions that is called by the Game::FeatureUnit it is attached to. More...
 
struct  ManagerHandle
 
class  Message
 
struct  MessageListener
 
struct  MessageListenerId
 
struct  Orientation
 
class  PackedLevel
 
struct  Position
 
class  Processor
 
class  ProcessorBuilder
 
struct  ProcessorJobContext
 
struct  ProcessorJobInput
 
struct  Scale
 
struct  TemplateId
 
struct  TimeSource
 A generic time source POD struct which is created and deleted by the TimeManager. More...
 
struct  TimeSourceCreateInfo
 Used to create a timesource. More...
 
struct  Velocity
 
class  World
 

Typedefs

typedef MemDb::AttributeId ComponentId
 
using ComponentArray = Util::FixedArray<ComponentId>
 
using AccessModeArray = Util::FixedArray<AccessMode>
 
typedef uint32_t Filter
 Opaque filter identifier.
 
typedef MemDb::TableSignature InclusiveTableMask
 
typedef MemDb::TableSignature ExclusiveTableMask
 
typedef uint32_t ProcessorHandle
 Opaque processor handle.
 

Enumerations

enum  ComponentFlags : uint32_t { COMPONENTFLAG_NONE = 0 , COMPONENTFLAG_DECAY = 1 << 0 }
 Specifies special behaviour for a components. More...
 
enum  AccessMode { READ , WRITE }
 

Functions

WorldGetWorld (uint32_t worldHash)
 returns a world by hash
 
void ReleaseDatasets ()
 Recycles all current datasets allocated memory to be reused.
 
Game::Dataset Query (Ptr< MemDb::Database > const &db, Util::Array< MemDb::TableId > &tables, Filter filter)
 Query a subset of tables in a specific db using a specified filter set.
 
BlueprintId GetBlueprintId (Util::StringAtom name)
 Returns a blueprint id by name.
 
TemplateId GetTemplateId (Util::StringAtom name)
 Returns a template id by name.
 
void DestroyFilter (Filter)
 Destroy a filter.
 
ComponentId GetComponentId (Util::StringAtom name)
 Returns a component id.
 
template<typename COMPONENT >
ComponentId GetComponentId ()
 Returns a component id, based on template type.
 
template<>
void ComponentDrawFuncT< Game::Entity > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< bool > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< int > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< uint > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< float > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Util::StringAtom > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Math::mat4 > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Math::vec3 > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Game::Position > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Game::Orientation > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Game::Scale > (ComponentId component, void *data, bool *commit)
 
template<typename TYPE >
void ComponentDrawFuncT (ComponentId component, void *data, bool *commit)
 
template<typename TYPE , std::size_t i = 0>
void InspectorDrawField (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Game::Entity > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< bool > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< int > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< uint > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< float > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< Util::StringAtom > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< Math::mat4 > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< Math::vec3 > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< Game::Position > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< Game::Orientation > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< Game::Scale > (ComponentId, void *, bool *)
 
 __ImplementClass (FeatureUnit, 'GAFE', Core::RefCounted)
 
InclusiveTableMask const & GetInclusiveTableMask (Filter)
 retrieve the inclusive table mask
 
ExclusiveTableMask const & GetExclusiveTableMask (Filter)
 retrieve the exclusive table mask
 
Util::FixedArray< ComponentId > const & ComponentsInFilter (Filter)
 retrieve the inclusive component array
 
Util::FixedArray< AccessMode > const & AccessModesInFilter (Filter)
 retrieve the inclusive access mode array
 
Util::FixedArray< ComponentId > const & ExcludedComponentsInFilter (Filter)
 retrieve the excluded component array
 
void FrameBatchJob (SizeT totalJobs, SizeT groupSize, IndexT groupIndex, SizeT invocationOffset, void *ctx)
 
 __ImplementClass (Game::GameServer, 'GMSV', Core::RefCounted)
 
 __ImplementSingleton (Game::GameServer)
 
template<typename COMPONENT_TYPE >
ComponentId RegisterType (ComponentRegisterInfo< COMPONENT_TYPE > info={})
 Register a component type.
 

Variables

static Memory::ArenaAllocator< sizeof(Dataset::View) *256 > viewAllocator
 
static Ids::IdAllocator< InclusiveTableMask, ExclusiveTableMask, ComponentArray, AccessModeArray, ComponentArrayfilterAllocator
 
static Util::FixedArray< ComponentDecayBuffercomponentDecayTable
 TODO: move into world.
 

Typedef Documentation

◆ AccessModeArray

◆ ComponentArray

◆ ComponentId

◆ ExclusiveTableMask

◆ Filter

typedef uint32_t Game::Filter

Opaque filter identifier.

◆ InclusiveTableMask

◆ ProcessorHandle

typedef uint32_t Game::ProcessorHandle

Opaque processor handle.

Enumeration Type Documentation

◆ AccessMode

Enumerator
READ 
WRITE 

◆ ComponentFlags

enum Game::ComponentFlags : uint32_t

Specifies special behaviour for a components.

Enumerator
COMPONENTFLAG_NONE 

regular component

COMPONENTFLAG_DECAY 

Component will decay.

This will delay the deletion of this component by one frame, allowing managers to clean up externally allocated resources

Function Documentation

◆ __ImplementClass() [1/2]

Game::__ImplementClass ( FeatureUnit ,
'GAFE' ,
Core::RefCounted  )

◆ __ImplementClass() [2/2]

Game::__ImplementClass ( Game::GameServer ,
'GMSV' ,
Core::RefCounted  )

◆ __ImplementSingleton()

Game::__ImplementSingleton ( Game::GameServer )

◆ AccessModesInFilter()

Util::FixedArray< AccessMode > const & Game::AccessModesInFilter ( Filter filter)

retrieve the inclusive access mode array

◆ ComponentDrawFuncT()

template<typename TYPE >
void Game::ComponentDrawFuncT ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< bool >() [1/2]

template<>
void Game::ComponentDrawFuncT< bool > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< bool >() [2/2]

template<>
void Game::ComponentDrawFuncT< bool > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< float >() [1/2]

template<>
void Game::ComponentDrawFuncT< float > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< float >() [2/2]

template<>
void Game::ComponentDrawFuncT< float > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Entity >() [1/2]

template<>
void Game::ComponentDrawFuncT< Game::Entity > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Entity >() [2/2]

template<>
void Game::ComponentDrawFuncT< Game::Entity > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Orientation >() [1/2]

template<>
void Game::ComponentDrawFuncT< Game::Orientation > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Orientation >() [2/2]

template<>
void Game::ComponentDrawFuncT< Game::Orientation > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Position >() [1/2]

template<>
void Game::ComponentDrawFuncT< Game::Position > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Position >() [2/2]

template<>
void Game::ComponentDrawFuncT< Game::Position > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Scale >() [1/2]

template<>
void Game::ComponentDrawFuncT< Game::Scale > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Game::Scale >() [2/2]

template<>
void Game::ComponentDrawFuncT< Game::Scale > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< int >() [1/2]

template<>
void Game::ComponentDrawFuncT< int > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< int >() [2/2]

template<>
void Game::ComponentDrawFuncT< int > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Math::mat4 >() [1/2]

template<>
void Game::ComponentDrawFuncT< Math::mat4 > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Math::mat4 >() [2/2]

template<>
void Game::ComponentDrawFuncT< Math::mat4 > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Math::vec3 >() [1/2]

template<>
void Game::ComponentDrawFuncT< Math::vec3 > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Math::vec3 >() [2/2]

template<>
void Game::ComponentDrawFuncT< Math::vec3 > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< uint >() [1/2]

template<>
void Game::ComponentDrawFuncT< uint > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< uint >() [2/2]

template<>
void Game::ComponentDrawFuncT< uint > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Util::StringAtom >() [1/2]

template<>
void Game::ComponentDrawFuncT< Util::StringAtom > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentDrawFuncT< Util::StringAtom >() [2/2]

template<>
void Game::ComponentDrawFuncT< Util::StringAtom > ( ComponentId component,
void * data,
bool * commit )

◆ ComponentsInFilter()

Util::FixedArray< ComponentId > const & Game::ComponentsInFilter ( Filter filter)

retrieve the inclusive component array

◆ DestroyFilter()

void Game::DestroyFilter ( Filter )

Destroy a filter.

◆ ExcludedComponentsInFilter()

Util::FixedArray< ComponentId > const & Game::ExcludedComponentsInFilter ( Filter filter)

retrieve the excluded component array

◆ FrameBatchJob()

void Game::FrameBatchJob ( SizeT totalJobs,
SizeT groupSize,
IndexT groupIndex,
SizeT invocationOffset,
void * ctx )

◆ GetBlueprintId()

BlueprintId Game::GetBlueprintId ( Util::StringAtom name)

Returns a blueprint id by name.

◆ GetComponentId() [1/2]

template<typename COMPONENT >
ComponentId Game::GetComponentId ( )
inline

Returns a component id, based on template type.

– Template implementations –

◆ GetComponentId() [2/2]

ComponentId Game::GetComponentId ( Util::StringAtom name)
inline

Returns a component id.

◆ GetExclusiveTableMask()

ExclusiveTableMask const & Game::GetExclusiveTableMask ( Filter filter)

retrieve the exclusive table mask

◆ GetInclusiveTableMask()

InclusiveTableMask const & Game::GetInclusiveTableMask ( Filter filter)

retrieve the inclusive table mask

◆ GetTemplateId()

TemplateId Game::GetTemplateId ( Util::StringAtom name)

Returns a template id by name.

◆ GetWorld()

World * Game::GetWorld ( uint32_t hash)

returns a world by hash

◆ InspectorDrawField()

template<typename TYPE , std::size_t i = 0>
void Game::InspectorDrawField ( ComponentId component,
void * data,
bool * commit )

◆ Query()

Dataset Game::Query ( Ptr< MemDb::Database > const & db,
Util::Array< MemDb::TableId > & tables,
Filter filter )

Query a subset of tables in a specific db using a specified filter set.

Modifies the tables array so that it only contains valid tables. This does NOT wait for resources to be available.

◆ RegisterType()

template<typename COMPONENT_TYPE >
ComponentId Game::RegisterType ( ComponentRegisterInfo< COMPONENT_TYPE > info = {})

Register a component type.

◆ ReleaseDatasets()

void Game::ReleaseDatasets ( )

Recycles all current datasets allocated memory to be reused.

Variable Documentation

◆ componentDecayTable

Util::FixedArray<ComponentDecayBuffer> Game::componentDecayTable
static

TODO: move into world.

◆ filterAllocator

◆ viewAllocator

Memory::ArenaAllocator<sizeof(Dataset::View) * 256> Game::viewAllocator
static