Overview of the Entity Context Lifecycle

This page describes the lifecycle of the entity context / the simulation and all its stages.

Update Phases

In your Engine / Systems you an define in which Phase of the Update loop, your Engine / System shall run. This can be managed via the: .before_me, .after_me and .phase fields of your engine or system definition.

Please keep in mind that the Scheduler will order your system based on what kind of components you might modify or not! This is why it is always recommended to say what kind of components your system/engine will operate on and what they will do with them (Write to them or not). Depending on your dependencies the scheduler will decide if your engine/system can run in parallel.

The Engine has default phases:

TM_PHASE__ANIMATIONPhase for animation jobs.
TM_PHASE__PHYSICSPhase for physics jobs.
TM_PHASE__CAMERAPhase for camera jobs.
TM_PHASE__GRAPHPhase for the visual scripting graph update.
TM_PHASE__RENDERPhase for render jobs.

Note: that phases are just string hashes and you can extend the systems with more phases if desired.