Entities: the things of a level that live (barrels that explode, trigger zones, relays, doors, enemies...). They are read from a level (sections ENTI, PROP and LINK, see Documentation/level_format.md).
More...
Go to the source code of this file.
Entities: the things of a level that live (barrels that explode, trigger zones, relays, doors, enemies...). They are read from a level (sections ENTI, PROP and LINK, see Documentation/level_format.md).
- Author
- Johannes Fetz
- An entity has a class: its behavior. The engine has the generic classes (explosive, trigger, relay...), the game registers its own classes with jo_entity_register_class() before jo_entities_load()
- Events and actions: when something happens to an entity (EVENT_DEATH, EVENT_ENTER...), the links of the level send actions to other entities (ACTION_DAMAGE, ACTION_TRIGGER...), with a delay. The game doesn't wire anything
- Damage: health, EVENT_DAMAGE, EVENT_DEATH, damage around a point (the explosions damage the other barrels: chain reactions); the damage of the player is given to the game (jo_entities_set_area_damage_callback())
- Only the entities near the player (or that wait for something) are updated