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

Detailed Description

Game::EditorState.

A state singleton that keeps track of the state of the level editor.

Note
Though the editor is an external library, we still need to keep track of the editors state from the game layer in some way, which is why this exists.

Namespaces

namespace  Time

Classes

struct  Orientation
 A component that stores the orientation of an entity. More...
struct  Position
 A component that stores the position of an entity in world space coordinates. More...
struct  Scale
 A component that stores the scale of an entity. More...
struct  Velocity
 A component that stores the linear velocity of an entity. More...
struct  AngularVelocity
class  PackedLevel
 Represents a level that can be instantiated into a world. More...
class  BlueprintManager
 Loads the 'data:tables/blueprint.json' file and subsequently sets up categories based on the blueprints in the entity manager. More...
struct  TimeSourceCreateInfo
 Used to create a timesource. More...
struct  TimeSource
 An object that keeps track of running time and frame time (delta time). More...
class  TimeManager
 Singleton object which manages all Game::TimeSource objects. More...
struct  BlueprintId
struct  TemplateId
struct  EntityTableCreateInfo
struct  ComponentDecayBuffer
 Contains data for components flagged with COMPONENTFLAG_DECAY, that has been deleted this frame. More...
struct  ComponentRegisterInfo
 Used for registering component types to the game world. More...
class  ComponentInterface
 These are registered to the attribute registry so that we can add more functionality to attributes. More...
class  ComponentInspection
 Component inspection functions. More...
class  ComponentSerialization
 Component serialization functions. More...
struct  Dataset
 A dataset that contains views into category tables. More...
class  EditorState
struct  WorldHash
struct  Entity
 An entity is essentially just an Id with some utility functions attached. More...
struct  EntityMapping
 Maps an entity to a table and instance id. More...
class  EntityPool
 Generation pool. More...
class  FeatureUnit
 A FeatureUnit is an encapsulated feature which can be added to an application. More...
class  FilterBuilder
struct  ProcessorJobInput
struct  ProcessorJobContext
class  FrameEvent
class  FramePipeline
class  GameServer
 The game server setups and runs the game world. More...
struct  Manager
 Managers are objects which care about some specific functionality of a feature. More...
struct  MessageListenerId
struct  MessageListener
class  Message
class  Processor
class  ProcessorBuilder
struct  EntityCreateInfo
class  World
 A container of entities, their components, and processors. More...

Typedefs

typedef MemDb::AttributeId ComponentId
typedef uint32_t WorldId
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

template<>
void ComponentDrawFuncT< GraphicsFeature::AreaLightShape > (Game::Entity, ComponentId, void *, bool *)
 __ImplementClass (Game::BlueprintManager, 'BpMa', Game::Manager)
 __ImplementClass (Game::TimeManager, 'TiMa', Game::Manager)
 __ImplementSingleton (Game::TimeManager) TimeManager
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 > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< bool > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< int > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< int64_t > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< uint > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< uint16_t > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< int16_t > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< uint64_t > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< float > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Util::StringAtom > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Math::mat4 > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Math::vec3 > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Math::vec4 > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Math::quat > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Game::Position > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Game::Orientation > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Game::Scale > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Util::Color > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Util::BitField< 16 > > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Util::BitField< 32 > > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Util::BitField< 64 > > (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<typename TYPE>
void ComponentDrawFuncT (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<typename TYPE, std::size_t i = 0>
void InspectorDrawField (Game::Entity owner, ComponentId component, void *data, bool *commit)
template<>
void ComponentDrawFuncT< Game::Entity > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< bool > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< int > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< int64_t > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< uint > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< uint64_t > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< uint16_t > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< int16_t > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< float > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Util::StringAtom > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Math::mat4 > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Math::vec3 > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Math::vec4 > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Math::quat > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Game::Position > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Game::Orientation > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Game::Scale > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Util::Color > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Util::BitField< 16 > > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Util::BitField< 32 > > (Game::Entity, ComponentId, void *, bool *)
template<>
void ComponentDrawFuncT< Util::BitField< 64 > > (Game::Entity, ComponentId, void *, bool *)
 __ImplementSingleton (Game::EditorState)
 __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)
 __ImplementClass (Game::Manager, 'GAMA', Core::RefCounted)
WorldGetWorld (WorldHash worldHash)
 returns a world by hash
WorldGetWorld (WorldId worldId)
 returns a world by id

Variables

static Memory::ArenaAllocator< sizeof(Dataset::View) *256 > viewAllocator
static Core::CVarcl_draw_entity_references
static Ids::IdAllocator< InclusiveTableMask, ExclusiveTableMask, ComponentArray, AccessModeArray, ComponentArrayfilterAllocator

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.

◆ WorldId

typedef uint32_t Game::WorldId

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/5]

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

◆ __ImplementClass() [2/5]

Game::__ImplementClass ( Game::BlueprintManager ,
'BpMa' ,
Game::Manager  )

◆ __ImplementClass() [3/5]

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

◆ __ImplementClass() [4/5]

Game::__ImplementClass ( Game::Manager ,
'GAMA' ,
Core::RefCounted  )

◆ __ImplementClass() [5/5]

Game::__ImplementClass ( Game::TimeManager ,
'TiMa' ,
Game::Manager  )

◆ __ImplementSingleton() [1/3]

Game::__ImplementSingleton ( Game::EditorState )

◆ __ImplementSingleton() [2/3]

Game::__ImplementSingleton ( Game::GameServer )

◆ __ImplementSingleton() [3/3]

Game::__ImplementSingleton ( Game::TimeManager )

◆ AccessModesInFilter()

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

retrieve the inclusive access mode array

◆ ComponentDrawFuncT()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

◆ ComponentDrawFuncT< GraphicsFeature::AreaLightShape >()

template<>
void Game::ComponentDrawFuncT< GraphicsFeature::AreaLightShape > ( Game::Entity ,
ComponentId ,
void * ,
bool *  )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

template<>
void Game::ComponentDrawFuncT< Util::StringAtom > ( Game::Entity owner,
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() [1/2]

World * Game::GetWorld ( WorldHash hash)

returns a world by hash

◆ GetWorld() [2/2]

World * Game::GetWorld ( WorldId id)

returns a world by id

◆ InspectorDrawField()

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

◆ 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.

◆ ReleaseDatasets()

void Game::ReleaseDatasets ( )

Recycles all current datasets allocated memory to be reused.

Variable Documentation

◆ cl_draw_entity_references

Core::CVar* Game::cl_draw_entity_references
static

◆ filterAllocator

◆ viewAllocator

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