HoverEX calls a game environment Arena. Arena consist of three essential dynamic data that can differ from game to game. They are:
To make things simple for Arena building, HoverEX has a specially written editor just for that.
More info of the editor can be found here.
How HoverEX seperates it’s data is pretty straight forward.
Being so, a map file would consist of these three parts. At the sound of this, it might seemed that we are duplicating alot of data as TileSet and EntitySet are stored in a map. This makes it such that every map that uses the same TileSet and EntitySet actually do not share anything at all. In the first glance, this does not seemed like a good idea. Hoever, this design was decided because of the version uncertainty and conflict that could happen in sharing TileSet and EntitySet.
However, when building a map, we need a TileSet and EntitySet independently. Hence, we have deviced the TileSet and EntitySet to beable to be stored seperately from the map. This however is strictly for map creation only and changing them does not affect any game play at all.
This section discussed about how the internal datastructure of HoverEX Arena works.
Bellow holds the current state of the Arena classes. Arena was designed to be splitted into
The order of the classes are placed respectively to how they inherit each other.
HX_EditorArena ← HX_ClientArena ← HX_Arena
| HX_Arena | ||
|---|---|---|
| bsp_manager | BSP Engine to deal with optimized wall lines | |
| object_list | List of objects(puck and crafts) | |
| projectile_list | List of projectiles | |
| config | The XML config file that describes the arena | |
| team_list[4] | The team list | |
| HX_ClientArena | ||
|---|---|---|
| map | Defines the grid map of the arena | |
| tileset | Defines the tileset(graphics) of the arena | |
| renderer | The rendering engine to render the arena | |
HX_EditorArena is like HX_ClientArena but with an additional ability to edit the Arena.
Map(arena) file is a zip file consisting of the following files:
| map_name.arena | |
|---|---|
| Filename | File Description |
config.xml | arena configurations |
tumbnail.png | the tumbnail shown when map is selected |
map/grid.dat | the tile based map data |
map/bsp.dat | bsp optimized wall lines for collision detection |
tileset/floor.[png,tga,jpg] | floor image file |
tileset/wall.[png,tga,jpg] | wall image file |
tileset/wall_lines.dat | line description for walls of each tile |
entityset/object/craft[1-4].[png,tga] | the craft’s image for each team |
entityset/object/craft-shadow[1-4].[png,tga] | the craft’s shadow image for each team |
entityset/object/puck.[png,tga] | the puck’s image |
entityset/object/puck-shadow.[png,tga] | the puck’s shadow image |
entityset/turret/*[1-4].[png,tga] | the craft’s turret images for each team |
entityset/projectile/*.[png,tga] | the projectile images |
entityset/item/*.[png,tga] | the retrievable item images |
NOTE: Files in Italic is optional. You can practically define your own structure. The listed ones are just a suggestion.
But the entityset dir MUST be present and all entityset graphics should go inside.
This section describes the config file of Arena. To keep things simple and backward compatible, we have a config file using XML format for both the Map and the TileSet.
<hoverex ver="2.0">
<arena name="arena_name" desc="arena_desc" author="arena_author" map-width="map_width" map-height="map_height">
<spawn-point type="puck" x="x_pos" y="y_pos"/>
<spawn-point type="team" for="team_id" x="x_pos" y="y_pos" facing-angle="direction" />
<spawn-point type="items" x="x_pos" y="y_pos" spawn-interval="milli_sec" style="[random, sequence, pingpong]">
<item use="item_id1" />
<item use="item_id2" />
<item use="item_id3" />
</spawn-point>
</arena>
<tileset
name="tileset_name"
desc="tileset_desc"
author="tileset_author"
floor-image="tileset_floor_file_name"
wall-image="tileset_wall_file_name"
/>
<entityset name="entity_name" desc="entity_desc" author="entity_author">
<physics air-density="air_density_value" gravity="gravity" />
<puck
image="puck_image_file_name"
shadow-image="puck_shadow_image_file_name"
radius="radius" mass="mass"
friction="friction_coefficient"
drag="drag_coefficient" />
<craft radius="radius" mass="mass" thrust="thrust" friction="friction_coefficient" drag="drag_coefficient" />
<turret name="turret name" id="turret_id" image="turret_image">
<gun use="projectile_id" limit="{0 = infinite}" power-drain="{0 is not allowed}" interval="milli_sec">
<barrel dx="offset_x" dy="offset_y" direction="direction" />
<barrel dx="offset_x" dy="offset_y" direction="direction" />
<barrel dx="offset_x" dy="offset_y" direction="direction" />
</gun>
<gun use="projectile_id" limit="{0 = infinite}" power-drain="{0 is not allowed}" interval="milli_sec">
<barrel dx="offset_x" dy="offset_y" direction="direction" />
</gun>
</turret>
<team id="team1"
name="team1 name" color="#rrggbb"
craft-image="craft_image_file_name"
craft-shadow-image="craft_shadow_image_file_name" />
<team id="team2" name="team2 name" color="#rrggbb"
craft-image="craft_image_file_name"
craft-shadow-image="craft_shadow_image_file_name" />
<team id="team3" name="team3 name" color="#rrggbb"
craft-image="craft_image_file_name"
craft-shadow-image="craft_shadow_image_file_name" />
<team id="team4" name="team4 name" color="#rrggbb"
craft-image="craft_image_file_name"
craft-shadow-image="craft_shadow_image_file_name" />
<projectile
name="projectile name"
id="projectile_id"
image="image_file"
life="milli_sec"
radius="radius"
mass="mass"
velocity="velocity"
explosion-force="explosion-force"
/>
</entityset>
</hoverex>