ECS vs OOP in game architecture
I built the same prototype twice: once with classic OOP inheritance, once with an Entity-Component-System. The difference was stark.
OOP: clean until it isn't
Inheritance works fine for 10 entity types. By entity type 20, you hit the classic diamond problem — a FlyingEnemy that is also a Boss that also explodes on death. Multiple inheritance chains get ugly fast.
ECS: everything is data
In ECS, a "FlyingBossExplosion" is just an entity with a Position, a Health, a FlyBehaviour, and an ExplodeOnDeath component. No class hierarchy. Systems operate on components, not objects.
The mental shift is real: you stop thinking about what an entity IS and start thinking about what it HAS.
Performance bonus
Components of the same type live contiguously in memory. Cache friendliness is a free lunch. Unity's DOTS proved this at scale — I proved it at small scale.
When to use which
For tools and business apps: OOP every time. For games with many entity types that share behaviours in surprising combinations: ECS. Know the problem before picking the pattern.