Queries without an explicit tag are a very brittle way to keep lists (basically an ivitation to bugs related to violating the open-closed priniciple)
ent::Query<component::GlobalPose,
component::InGamePowerup,
component::Collision,
component::Geometry,
component::LevelEntity>
mInGameDogPowerups;
ent::Query<component::GlobalPose,
component::InGamePowerup,
component::Speed,
component::Geometry,
component::LevelEntity>
mInGameMissilePowerups;code
The design around phases to commit is not convenient:
ECS queries:
Implicit lists (
ent::Query) couple the taken actions (i.e. system iterations) to composition. This means the taken actions are coupled to all code (current, and future) that is touching to composition.Query. Yet, if this query is also used in some unrelated system (benefiting from query caching), it might introduce a logic error because this other system might also be interested in entities without the new component. This kind of error invalidates the "implicit validation" conducted by the iterative manual tests.Queries without an explicit tag are a very brittle way to keep lists (basically an ivitation to bugs related to violating the open-closed priniciple)
Optionalsare another way to introduce dangling pointers.