You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current version:
System is a virtual class with overridden member functions. Systems are managed by SystemManager. They are not connected. On the outside this looks very similar to what DOTS does.
Proposed version:
Systems are entities with a System component attached. Maybe even inheriting from Query (so they are cached). This gives us a lot of flexibility. Enabling the system = enabling the entity. Systems can be queried (e.g. disable all systems that do this-and-that easily).
Organized into stages. Stages can be user defined, probably implemented as components. In order for the grouping to work correctly, relationship support would come handy.
auto s = w.system()
.stage<LateUpdate>() // optional, if not used, the system goes to the default stage
.all<Position&, Velocity>()
.any<Rotation>()
.OnCreated([](ecs::Query& q) { // event when created
})
.OnStopped([](ecs::Query& q) { // event when stopped
...
})
// other events
...
// function to run every update (equivalent to ecs::query::each)
.OnUpdate([](Position& p, const Velocity& v) {
p.x += v.x * dt;
p.y += v.y * dt;
p.z += v.z * dt;
})
.commit();
Necessary:
support for entity naming
entity sorting/grouping
entity relationship support
The text was updated successfully, but these errors were encountered:
Current version:
System is a virtual class with overridden member functions. Systems are managed by SystemManager. They are not connected. On the outside this looks very similar to what DOTS does.
Proposed version:
Systems are entities with a System component attached. Maybe even inheriting from Query (so they are cached). This gives us a lot of flexibility. Enabling the system = enabling the entity. Systems can be queried (e.g. disable all systems that do this-and-that easily).
Organized into stages. Stages can be user defined, probably implemented as components. In order for the grouping to work correctly, relationship support would come handy.
Necessary:
The text was updated successfully, but these errors were encountered: