User Tools

Site Tools


Sidebar

hpl3:engine:entities

Entities

General

Generals all use .ent files that are created in the model editor tool. Exactly how an entity functions is largely up to the app using the engine. Entities can be background props, enemies, and pretty much whatever. For more specific information on the basic types that are provided in the default game setup, check the Game Scripting Guide.

On this page the more general structure of entities will be covered.

Lowlevel Structure

At the very basic level an entity comes as an .ent file that is loaded by the engine. The engine provides a basic loader for entities that handles loading of the basic types contained in it. The game can provide their own loader built from scratch, but one almost always wants to use the loader that the engine provides. The default game provides a few basic types like like Props (doors, buttons, dynamic crates, etc) and Agents (enemies, NPCs, etc) that are used as a foundation for the actual entity used in the game. The final entity type is defined by a script file, which takes care of all specific entity loading, setup and logic.

In order to specify a type it first needs to be added to “config/EntityTypes.cfg” under the basic game type is should used (Prop, Agent, etc). Here the name (used as an identfier), the script file, the class name (refering to the main class in the script file) and if it is forced to have full game save (if all data is always saved) is specified. Then the editor must also know about this type and do do this “edtitor/EntityClasses.def” needs to be updated with the type's variables.

Here is an example:
The entity “

Data Structure

Creation

Level Editor variables

hpl3/engine/entities.1351070161.txt.gz · Last modified: 2012/10/24 09:16 by thomas