News for hackers. Stuff that matters.
Re:Flecs – A fast entity component system for C and C++ by ajmmertens on Tuesday April 04, 2023 @04:22PM (#35445384)
Or if you want code that's easier to extend, read and don't want to do your own memory management.

Here's a bit of code from that project that generates a monster: https://github.com/tmewett/BrogueCE/blob/master/src/brogue/M...

It just allocates an object per monster, followed by initializing a long list of members that presumably just gets longer as more game systems get added.

The same code in ECS would look a lot simpler, and probably perform better/have better cache locality.

There are no comments on this comment yet.