Each scene consists in a list of 2D entities, such as walls, pillars, crates, characters, space ships, enemies, candles, torches or even floor tiles or back/foreground decorative elements.
Entities may be dynamically added to scene during gameplay through scripting (
The Entity Editor tab
Each entity may consist of:
Sprite (diffuse map): determines entity color and shape from a bitmap file. Transparent pixels are supported.
Normal map: used for rich 3D lighting. This bitmap represents what the entity surface looks like. Entities without a normal map will look flat when lit.
Gloss map: used for specular lighting. This bitmap will determine how parts of the sprite should reflect light sources. Brighter pixels increase reflection shininess.
Particle system slot-A/0: each entity may have up to two particle systems attached to it. Both may be used at the same time for creating effects such as fire (using particle slot A) and smoke (using slot B). If the particle system on slot A is not infinite (has no limited number of repetitions) and its owner entity has a light source, the light source brightness will decrease accordingly to how many particles are still alive.
Particle system slot-B/1: Second particle source.
Light source: entities may cast a point light. Lights have individual customization properties such as color and range.
Light halo bitmap: if the entity has its own light source, it may have a bitmap to be rendered as a light halo (optional).
Physics-simulated body: a Box2D body can be assigned to entity in order to enable simulation. The collision shape may be a box, circle, a polygon or a compound shape. More about physics on Ethanon Engine.
Combinations of the elements listed above may create various sorts of entities:
Entities are stored in *.ent files.
Warning! Shadows are not available on OpenGL ES 2.0 implementations (Android and iOS)
Once added into the scene, every single entity is assigned an identification number (ID number). Many entities in a scene will probably share several properties in common, e.g.: the same original file name, the same sprite file, etc. but never the same ID number.
Examples of entity usage in script:
// add zombie to scene AddEntity("zombie.ent", vector3(posX, posY, posZ), angle); // add a character to scene, retrieve a handle and move him ETHEntity@ heroHandle; AddEntity("hero.ent", heroPos, @heroHandle); heroHandle.AddToPosition(movementVector);