πEntity Component System (ECS)
- tags
Entity Component System (ECS) is an architectural pattern (most commonly seen in games) that consists of:
- Entities as simple containers for components. In many implementations, entity is just an ID.
- Components that carry data. They are usually βjust dataβ and donβt have any methods/behavior of their own.
- Systems that operate on entities and component. Systems are usually simple functions.
Pros
- ECS architecture allows great flexibility in defining entity types
- ECS may provide better performance
- ECS makes it easy to store/load game state