3 ms·
Functionality composition is tangential to ECS. You can choose composition over inheritance in all types of architectures.
by jayd16 8y ago
Functionality composition is tangential to ECS. You can choose composition over inheritance in all types of architectures.
- bitwize 8y agoComposition is only one of the reasons why it makes sense to consider ECS. Structuring your game state as pure data makes it easier to serialize, to double-buffer, and to arrange in memory how you see fit. There are non-ECS ways of doing this but ECS is the easiest way I've found to write general code that can operate the same over many different kinds of game objects.