If you think ECS systems are about “problems with OOP” and not “cache coherence” I’ve got a bridge to sell you.
Composition over inheritance. Maintainability. Decoupling.
The cache lcoality is to me a nice bonus.
The author presents two problems with oop (1. multiple inheritance and 2. the question of which object should own mutations of common properties). These are similar arguments to those made by another game developer of note https://kyren.github.io/2018/09/14/rustconf-talk.html (chucklefish), which lends credence to the ideas.
IIRC chucklefish also discusses cache coherence, but on balance ECS appears to help with both cache and OOP problems. It’s not exclusive.
Would you care to give more than a snarky response?
My apologies if my comment made you feel judged. I appreciate contrary opinions and I’m happy to have this article on the site.
Yeah, I’m pretty new to this site. Feels like the joke about the first time asking a question on SO.
@endershadow8 thanks for writing this!
It would be great if you could spend a bit more time in the article giving us a taste of what coding for an ECS looks and ‘feels’ like.
For instance, what kinds of data structures are entitites and components commonly implemented in terms of? How does persistence work? What’s the API like?
My intention for this article was only to try to explore some of the lines of reasoning that ECS is derived from. I’m planning to write something more detailed in the future.
Ah OK I totally get it. I look forward to future articles in the series!
I also think I understand a bit better what ECS is supposed to be. It’s not about any particular implementation, because entities and components could be provided by whatever framework you’re using, a database, etc etc. It’s just a way of organization information that avoids the pitfalls of object systems.
99% of debugging happens on the toilet.
I’ve been doing this for decades, and I still often forget that the best thing to do when I hit a wall is to queue up some good music and take an hour long walk or bike ride.