Atomic components in ECS

Started by
9 comments, last by wintertime 9 years, 4 months ago

I think the problem is when people are too much in an object oriented mindset, only take their gameobject, rename it to entity to follow the oversimplified pattern they found first when googling, replace the members with a single list of pointers to incompatible different components, hack around it by doing ugly type-checking on the whole array every time they need some data and over-observer-pattern-ifying everything, still keeping all logic in the entity or components, then think they were done with the conversion and proclaim they are using an ECS now, because they did not read enough about it. Then like for any fashionable thing others see this, copy that again and it gets implemented worse every time.

One older article series where I think its explained in the right way: http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/

TLDR: Keep the entity simple, an ID is enough. Have all components in homogenous arrays of same type(remember which ID each component belongs to), these arrays are worked on in whole by the systems, transforming the data step by step in simple loops.

This topic is closed to new replies.

Advertisement