Map Editor
For this game project I want to use a bit a different way of creating maps. Usually maps are done using a heightmap technic or a brush technic. Brushing is very powerfull but also eates up a lot of hd space and memory. Heightmaps on the other side have troubles dealing with overhanging map parts. Aiming for large outdoor scenes but still beeing able to do indoor scenes as well without killing the pc and the harddisc with lots of data I tried to find a way to simplify the description of maps. Most map formats are rather restricted in what kind of scenarios you can create with them. To unleash the full power possible I decided to use a mixed approach for my map format. For constructing the terrain there exist the Terrain Patches. They are mostly polygonal meshes you can create in your favourite 3D application. The terrain patches are then imported into the map editor using an XML format. Texturing is done using projective mapping or UV mapping for difficult cases. This way terrains, buildings and even complex static objects can modelled in no time using an external 3D application and then plugged together. The map editor is used mainly for glueing all the pieces of a map together and to provide an easy way to place action entities. Have a look at the screenshot sections for some shots of the editor.
Blender3D Python Scripts
Blender3D is a really good and especially free-software application that is well suited to deliver the models and animations needed for the project. To work with Blender3D there will be some Python Scripts available in the Drag[en]gine Source Code package.
Drag[en]gine Exporter
The Drag[en]gine Exporter is a python script composed of multiple export modules. All formats are XML formats which allow you to post process them before importing into the map editor or writing your own exporters. The following file formats can be exported.
- Models in the *.model.xml format. Exported are the model geometry, bone weighting informations, edge creasing, textures ( materials ) and textue coordinates. Exported models are immediatly usable in the game engine.
- Animations in the *.anim.xml format. Exported are all Actions which are not flagged invisible. Each Action is exported as one move with the same name. For each bone the position, rotation and size is saved on a keyframe basis with unrestricted intervals. There is no need to align keyframes of all bones as you can place them wherever you want. The playtime is considered from frame 1 up to the last keyframe placed in the Action. A frame rate of 50 frames per second is assumed. Later versions of the script will allow you to alter this value. Exported animations are immediatly usable in the game engine.
- Rigs in the *.rig.xml format. Exported is the bone structure with bone relationships. Space is left open for physical properties which Blender3D can not take care of. As this is an XML file you can alter and use it immediably. Exported rigs can be used directly in the game engine.
- Terrain Patches in the *.terrain.xml format. Exported are the geometry, edge creasing and textures ( materials ). Exported texture informations contain the projection settings from Blender3D mapped to the game engine. Currently supported are Flat Mapping, Cube Mapping and UV Mapping. Exported terrain patches have to be imported into a map using the map editor. Later versions of the script will also allow to export entire scenes into a map file so you can only befit it with entities later on in the map editor.