Engine::actor

Revision as of 02:03, 22 October 2025 by Watertoon (talk | contribs) (Renaming and corrections for shaft::baseproc knowledge.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This namespace houses ModuleSystem's Actor system. Which is implemented on top of Shaft::baseproc. Treat names as unofficial unless otherwise stated.

ActorModule

The namespace's IModule.

Managers

ActorMgr

Houses a set of user callbacks for the actor system. Manages the ActorInstanceHeap which is by default responsible for most BaseProc and PreActor memory management. Maintains an array of factories for creating BaseProc class derivatives by name.

PreActorMgr

Houses the PreActorRenderer. A pool of ActorSystemSettings with active settings stored in a hash map. A pool of PreActorRenderInfo. Two pools of sets of PreActors. An array of all the sets of PreActors. A PreActor allocator managed by a linked list. Houses the ActorAIGroupMgr and LinkMgr.

PreActorRenderer

Houses 2 MassModels. An array of PreActorRenderInfo currently pending load. An array of PreActors to be drawn sorted by their actor settings accompanied by an array of batch info grouping similar models together. Houses the PreActorModelComposer thread.

PreActorModelComposer (TODO)

ActorAIGroupMgr

Maintains a set of ActorAIGroup.

LinkMgr

Manages an array of links for PreActors

Units

PreActor

PreActors manage the state of an ActorBase before it's instantiation. Typically data comes from a bcett file parsed by a BancEntity. A PreActor stores a reference to it's BancEntity, a home transform, a hash of it's transform, a name, a hash to serve as a unique id, and a reference to it's ActorSystemSettings. If applicable it can contain the following. A ByamlIter to a dynamic section of data used to initialize the ActorBase's Blackboard or for user defined purposes. A ByamlIter to a set of phive specific parameters. A set of information used to initialize the ActorBase's Blackboard. A reference to the PreActor's ActorAIGroup with a set of user provided callbacks from the ActorAIGroup's ActorLogic. A reference to the PreActor's SimultaneousGroup. A reference to the PreActor's FarDeleteGroup. A handle to a set of link's in the LinkMgr. A handle to a StaticCompound referencing the PreActor's Phive PlacementID.

ActorSystemSettings (TODO)

ActorAIGroup (TODO)

SimultaneousGroup (TODO)

FarDeleteGroup (TODO)

ActorBase

ActorBase extends shaft::baseproc::BaseProc. It implements an active job for each of the 4 stages provided by the BaseProcMgr. These stages are named PreCalc, PostCalc, PostSensor, and FrameEndCalc. Notably, FrameStartCalc happens directly before PreCalc in the PreCalc job. The physics world for entities is calculated between PreCalc and PostCalc. The physics world for sensors is calculated between PostCalc and PostSensor. ActorBase has a single job priority value that represents only a subset of the priority range offered by BaseProcMgr and applies to each active job.


ActorBase maintains a home transform, a current transform, a request for the next transform, angular and linear velocites, an AABB, a Document reference to it's ActorParam, a reference to it's PreActor, a Transceiver, a BlackboardAccessor, an ActorBaseLink to an optional linked actor, and a pause key allocator for maintaining a more granular pause mask for various actor behavior while the actor is active. The majority of ActorBase behavior is implemented in a set of engine provided optional components (See engine::component).