Base System class with an update method and an init method. Each system will have a bitmask of when it should run. Each Engine::State should have a bitmask of what should run. Systems should be registered with the ECS (or maybe some kind of compile-time mechanism) and should be ran by the engine each update frame.
When the engine is parallelized, each synchronization checkpoint should be named and systems can register themselves to run during certain stages. Maybe something like:
enum EngineStage : std::uint32_t {
FrameStart = 0,
Animate = 3, // leave gaps for user-defined stages
RefreshTransforms = 3, // each stage always waits on previous. run simultaneous by aliasing
RendererSync = 5,
EndFrame = 7
}
Base
System
class with an update method and an init method. Each system will have a bitmask of when it should run. EachEngine::State
should have a bitmask of what should run. Systems should be registered with the ECS (or maybe some kind of compile-time mechanism) and should be ran by the engine each update frame.When the engine is parallelized, each synchronization checkpoint should be named and systems can register themselves to run during certain stages. Maybe something like: