For use with the architectural pattern most commonly used in Game Development. The core elements are as follows: Entity: The Entity is a general purpose object. Component: The raw data for one aspect of the object, and how it interacts with the world. System: Each System performs global actions on every Entity that possesses a Component. It is run continuously during execution.
Entity–component–system (ECS)
An ECS follows the Composition over inheritance principle that allows greater flexibility in defining entities where every object in a game's scene is an entity (e.g. enemies, bullets, vehicles, etc.).
Every Entity consists of one or more Components which add additional behavior or functionality. Therefore, the behavior of an Entity can be changed at runtime by adding or removing Components. This eliminates the ambiguity problems of deep and wide inheritance hierarchies that are difficult to understand, maintain and extend. Common ECS approaches are highly compatible and often combined with data-oriented design techniques.
Description lifted from Source Doc:
https://en.wikipedia.org/wiki/Entity%E2%80%93component%E2%80%93system
Additional Sources:
- https://github.com/SergeyMakeev/ecs/blob/master/README.md
- http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/
Examples:
- Artemis (Java)
- ECS (C++)
- Cistron (C++)
- Svelto.ECS (C# Unity3d)
- BrokenBricksECS (C# Unity3d)
- Entitas (C# Unity3d)
Videos:
- Unite Austin 2017 - Writing High-Performance C# Scripts
- Unity at GDC - A Data-Oriented Approach to Using Component Systems
Related Topics:
- Data-Oriented Design: