Entity component system
lastmod 2024-03-27created 2015-08-196 edits
Entity-component-system (ECS) is an architectural pattern that is mostly used in game development. 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.
The entity component system (ECS) is an architectural pattern mainly used in game development. ECS follows composition through the inheritance principle, greater flexibility in the entity-defining body where every object in a game's scene is an entity. (e.g. enemies, bullets, vehicles, etc.) Every entity is made up of one or more components that add extra behavior or functionality. Therefore an entity's behavior can be changed at runtime by adding or removing components. This removes the ambiguity problems of deep and wide inheritance hierarchies that are hard to understand, maintain, and extend. Common ECS approaches are highly commercial and are often combined with data-oriented design techniques.