-
Notifications
You must be signed in to change notification settings - Fork 14
Entities
Christian Oeing edited this page Jan 8, 2017
·
1 revision
Each and every object in our game is called an entity. Entities can be visible or not, move, attack targets, explode, be selected by the player or follow a path. Thus, entities are common across games of all genres.
Defining specific game entities is done by adding components. Each entity component contains a part of the data that makes up that entity: An AttackComponent tells us how much damage is done by each attack of the entity, and the HealthComponent knows how much it can take before being destroyed, for instance.
Note that entity components don’t contain any game logic. Modifying the game state will be done by game systems discussed later.