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  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...
 
class  EditorState
 
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  Manager
 Managers are objects which care about some specific functionality of a feature. More...
 
class  Message
 
struct  MessageListener
 
struct  MessageListenerId
 
struct  Orientation
 A component that stores the orientation of an entity. More...
 
class  PackedLevel
 Represents a level that can be instantiated into a world. More...
 
struct  Position
 A component that stores the position of an entity in world space coordinates. More...
 
class  Processor
 
class  ProcessorBuilder
 
struct  ProcessorJobContext
 
struct  ProcessorJobInput
 
struct  Scale
 A component that stores the scale of an entity. More...
 
struct  TemplateId
 
class  TimeManager
 Singleton object which manages all Game::TimeSource objects. More...
 
struct  TimeSource
 An object that keeps track of running time and frame time (delta time). More...
 
struct  TimeSourceCreateInfo
 Used to create a timesource. More...
 
struct  Velocity
 A component that stores the linear velocity of an entity. More...
 
class  World
 A container of entities, their components, and processors. More...
 
struct  WorldHash
 

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 > (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 > (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< int64 > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< uint > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< uint64 > (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< Math::vec4 > (ComponentId component, void *data, bool *commit)
 
template<>
void ComponentDrawFuncT< Math::quat > (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<>
void ComponentDrawFuncT< Util::Color > (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< int64 > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< uint > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< uint64 > (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< Math::vec4 > (ComponentId, void *, bool *)
 
template<>
void ComponentDrawFuncT< Math::quat > (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 *)
 
template<>
void ComponentDrawFuncT< Util::Color > (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 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 ( ComponentId component,
void * data,
bool * commit )
inline

◆ 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< GraphicsFeature::AreaLightShape >()

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

◆ 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< int64 >() [1/2]

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

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

template<>
void Game::ComponentDrawFuncT< int64 > ( 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::quat >() [1/2]

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

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

template<>
void Game::ComponentDrawFuncT< Math::quat > ( 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< Math::vec4 >() [1/2]

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

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

template<>
void Game::ComponentDrawFuncT< Math::vec4 > ( 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< uint64 >() [1/2]

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

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

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

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

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

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

template<>
void Game::ComponentDrawFuncT< Util::Color > ( 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() [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 ( 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

◆ filterAllocator

◆ viewAllocator

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