HexMap Creator
With this program, you can create, edit, save and load maps for tile-based games that use hexagon maps.
These maps can be exported as a mesh to MS DirectX (*.x ASCII) and DXStudio’s *.dxmesh files, including the creation of a texture and the export of two “location files” (which contain the center of each hexagon field in 3D coordinates, for later use in your game).
To create a map, open HexMapCreator and press “Set new map size”. Maps can be of size 1×1 to 200×200 hexagon fields. The map’s fields will automatically be filled with the height level selected (there are four levels: Water, Fields, Hills and Mountains).
To change a hexfield’s height level, select the height with the selection box on the right side. Then, click on the field on the map. Be sure to target the center of a field (more or less), as clicks near the border could target a field nearby. While the mouse cursor moves over the 2D map, the corresponding fields’ indices are shown on the right. Click and hold down the left mouse button and move the mouse on the map to draw height levels on the map.
Your data can be saved to and loaded from disk. Files are named like “*.map”.
To create a *.x-file and a *.dxmesh-file from the edited 2D-map, enter a name for your map (without suffix), then press the “Create Mapfiles” button. A new folder will be created, with several files in it.
Warning: The greater your map’s dimensions, the more time is needed to process! During the export process, five files are created.
[mapname].x
The DirectX mesh file to import into your game. It contains vertex data, normals, material and texture mapping data.
[mapname].bmp
The texture for the DirectX mesh. It is referenced by [mapname].x. Its height/width size is fixed to 256×64.
[mapname].dxmesh
The DXStudio mesh file to import into your game. It contains vertex data, normals, material, texture mapping data and the texture itself. It can be opened with e.g. WinZip to view its contents.
[mapname]_xz.txt
A data export file for handling of the map ingame. It contains the center (X/Z) and upside location (Y) of each hexagon field and its type. Data format like this:
20,20 ( = Number of fields in X, number of fields in Z) 0,0,0.000000,0.000000,0.000000,Fields ( = Index X, Index Z, 3D-position (X,Y,Z), type) ...
[mapname]_xz.xml
A data export file for handling of the map ingame. It contains the different terrain type definitions, size of the map and center (X/Z) and upside location (Y) of each hexagon field and its type. Data format like this:
<?xml version="1.0" encoding="UTF-8"> <map_definition> <terrain_type name="Water" description="tile covered with water" heightlevel="-0.3" /> ... <mapsize size_x="20" size_z="20" /> ... <tile index_x="0" index_z="0" terrain_type="Fields" x="0.000000" y="0.000000" z="0.000000" /> </map_definition>
To check the newly created x-file or dxmesh-file, double-click it (which should invoke the MS DirectX Viewer or the DXStudio viewer). Voila.
Screenshots
Downloads
File | Date | Size | Remarks |
HexMapCreator_1.5.zip | 4/18/2009 | 12MB | HexMapEditor V1.5, including demo maps and a small DXStudio demo application (source+exe) |