Skip to content
Nocte- edited this page Feb 2, 2013 · 5 revisions

An Entity System is a programming paradigm, much like Object Oriented programming. But where OO bundles data and methods into classes, an ES decouples instances, data, and methods as much as possible. Let's go over a few key concepts:

Entities

An Entity is a simple identifier that corresponds to a "thing" in your game world. It is a very abstract concept: it has no data or methods.

Components

Components model different aspects a "thing" can have. For example, if something is shown on screen, it has a position, an orientation, and a model. If it is an enemy, it might also have hit points and carry some items around. All these aspects are components, and entities can be labelled with them.

Systems

Systems act on components. For example, a physics system could take a velocity component, multiply it with a time step, and add it to the position component. A render system, on the other hand, would need a position and a model. The HUD could draw waypoints based on their position and name.

Clone this wiki locally