Gamecraft
0/462
The machine: all 32 words

Entity component system

Also said as ECS, Data-oriented design

A way of organising a game. An entity is only an id, components are plain data attached to it, and systems are loops that run over everything holding the components they care about.

Class hierarchies break when a design wants a flying, poisoned, explosive chest. Here you just add the parts. Keeping similar data together in memory also runs much faster.

“Do not add a PoisonedEnemy class. Add a Poisoned component with damage and duration, and a system that ticks everything holding one. Then barrels and players can be poisoned too.”

Blizzard's Timothy Ford explained at GDC 2017 how Overwatch is built on an entity component system, and how the team used it to keep the complexity of its gameplay and netcode in check.

Unity's classic GameObject with attached scripts has components, but each one holds its own logic. In a true ECS the components are data only, and the logic lives in systems.

Name a word, or describe what you mean in everyday language.