Fancy commercial game engines can have the luxury of making a ECS that spatially aware. On one hand it has performance benefits. On the other it couples the ECS to a particular geometry, and a particular geometry library... which makes it very hard to reuse separete from the game engine. Fancy commercial game engines can have the luxury of making a ECS that spatially aware. On one hand it has performance benefits. On the other it couples the ECS to a particular geometry, and a particular geometry library... which makes it very hard to reuse separete from the game engine.
Addendum: I believe it is possible to develop an ECS solution that allows to specify custom containers. Either for the whole or just for particular component types. We could tell such ECS to use (an adapter around) a quadtree that would be alike to the deeply woven one in the fancy ECS, except it was injected.
※: On one hand, we can have only entities that move have a velocity component, or alternatively we can add a component to mark entities that do not move. In either case, the systems would be able to iterate over and only over the entities that move, being sure that all of them moved since last tick. On the other hand, ECS often optimize for cache locality and fast access and iteration, in fact, a tighly managed ECS could even provide - temporary - direct references to components allowing to modify them quickly but with no means to rise an event to notify that they were (well, we could assume they were modified if the developer took the references).
※※: I haven't seen anIf the ECS that lets youallows to specify that it should use a custom container, either for the whole or just forin particular for specific component types (I conceptualize it as dependency injection). If an ECS allows you to specify the container, we could tell itthe ECS to use one that has events for value changed. However, heckif that is possible, we could tell itjust use (an adapter around) a quadtree that would be alike to the deeply woven one in the fancy ECS, except it was injectedquadtree. I am interested in developing such ECS.