News for hackers. Stuff that matters.
Re:Component Graph System (2017) by gameman144 on Friday July 16, 2021 @11:45AM (#27857496)
> And we decided that each system processes relevant entity data by iterating through entities first. Now we have another problem - growing the number of entities slows down every system, even the ones that are not related...

Call me out if I'm wrong, but I don't know of any high-performance ECS framework that actually does this. Most frameworks maintain sorted collections of components with no gaps. For instance, if I want all entries with X,Y,Z, then I iterate those three arrays starting at their X,Y, Z section, and the order of components in that section of the arrays matches exactly (meaning we can just iterate through them all).

This library seems like a really neat concept, but I think the ECS concepts that it's critiquing aren't actually used in many production-quality frameworks. Call me out if I'm just missing context here.

Also, I'd love more details on how CGS is able to always iterate on flat vectors with no gaps. The only way I've seen to accomplish this is to do a decent amount of work curating components into multiple orderings, so if CGS is avoiding that, I am equal parts skeptical and very very excited (since that would be super useful!)

Re:Component Graph System (2017) by jayd16 on Friday July 16, 2021 @12:31PM (#27857998)
Agree. This presents a bit of a strawman of ECS. No reason components can't reference others or Systems can keep look up tables in ECS.
Re:Component Graph System (2017) by hrh on Friday July 16, 2021 @12:21PM (#27857895)
What libraries/frameworks are state of the art?
Re:Component Graph System (2017) by xaedes on Friday July 16, 2021 @12:46PM (#27858176)
There is EnTT, an ECS as C++ library:

EnTT is a header-only, tiny and easy to use library for game programming and much more written in modern C++. Among others, it's used in Minecraft by Mojang, ...

https://github.com/skypjack/entt

Re:Component Graph System (2017) by gameman144 on Friday July 16, 2021 @01:24PM (#27858697)
EnTT is the one I was thinking of -- I'd highly recommend looking into its implementation, as it's both very well-documented and readable, and blazing fast.

The fact that even this caliber of implementation has to handle multi-component cases by doing super careful curation of components is what makes me skeptical that CGS would be able to solve this situation more efficiently/easily. I would be very happy to be proven wrong here, though.

Re:Component Graph System (2017) by jayd16 on Friday July 16, 2021 @12:32PM (#27858011)
Unity's implementation is well documented and handles this.