Jo Engine 2026.11.1
Jo Sega Saturn Engine
Loading...
Searching...
No Matches
entity.h File Reference

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.

Detailed Description

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
Remarks
Module JO_COMPILE_WITH_LEVEL_MODULE = 1 in the makefile (and JO_COMPILE_WITH_EFFECTS_MODULE = 1 for the fire, the smoke, the flash and the shake of the explosions, see effects.h)
  • 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