Skip to content

What is a ECS

Entities, components and systems

Entity–component–system (ECS) is an architectural patter that follows the composition over inheritance principle that allows greater flexibility in defining entities where every object in a world.

Every entity consists of one or more components which contains data or state. Therefore, the behavior of an entity can be changed at runtime by systems that add, remove or mutate 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.

For a more in deep read on this topic I could recommend this article.

Data-oriented Design

A data oriented design is a design in which the logic of the application is built up of data sets, instead of procedural algorithms, they are highly optimized, specially because how computer organize data.

For a more in deep read on this topic I could recommend this article.

Understanding Data-oriented design for ECS

On GDC 2019 Unity make a fascinating video about data-oriented design and ECS, and how this has a huge impact on performance, I strongly recommend watching this video.