5 ms·
I don't understand why this article is so angry? ECS is a great subset of OOP. Both are helpful tools where they make sense.
by LiterallyDoge 8y ago
I don't understand why this article is so angry? ECS is a great subset of OOP. Both are helpful tools where they make sense.
- learc83 8y agoECS as they are using it in this blog is about Data Oriented Design. It's not just OOP plus favoring composition over inheritance. DOD explicitly advocates separating data from behavior, and is strongly opposed to OOP in general.
- LiterallyDoge 8y agoJust so I understand you right: they're advocating global functions to operate on predictably similar data structures? If that's the case, it seems like you'd want some of them to be object-oriented, and some not.
- learc83 8y agoEach system tends to operate on different sets of data which don't tend to be very similar, and systems may operate on multiple data sets. You could build each system as an object, but you wouldn't want to store the relevant data structures within that object because other systems will likely need to use those data structures as well. The entire architecture is predicated on separating data and behavior. Yes you can build an ECS system using classes, but nothing about it fits into what you'd call OOP.
- thrower123 8y agoFor at least the last ten years, maybe fifteen, on the GameDev.net forums you haven't been able to swing a dead cat without hitting somebody going on and on about entity/component systems or pushing them as the One True Path, or trying to create their own implementation. It's probably worse now that Unity is so big. I'm not sure it is something I would pitch at beginning programmers, and there are a lot of them that wander into that, decide they are going to follow that advice, make a big mess, then wind up asking Hodgman and the handful other saintly regulars that keep that place going, to help them out.
- n42 8y agoit unfortunately undermines the message of the post for me. it just feels like another case of absolutism, fighting fire with fire, by the One True engineer who knows The Solution.
- Hodgman 8y agoIt's because every single article that's promoting ECS does so by comparing it against incorrect inheritance-based code. The amount of time you see newbies jumping on the ECS bandwagon because inheritance is bad, while they don't yet understand OOP, ECS, procedural, relational, or functional... is infuriating. Do both. Teach how to use composition. Teach how to use the relational model. Don't avoid teaching either by using misleading sales tactics.