The title Map editor is powerful and flexible, and I think it is possible to achieve the map needs of the game "tank Wars". the implementation of the title Map editor
The title Surface editor generates data files in XML format. The idea is that a map is composed of layers,
It is divided into image layer, block layer and object layer, and the hierarchical relationship of these layers can be specified sequentially.
The functional points that they implement are:
1. Create a new map.
2. Edit the object.
3. Edit the map block.
4. Edit the image layer.
5. Edit the block layer.
6. Edit the object layer.
1. Create a new map
L Specify the number of map blocks in the x, y direction
L Specify the size of the map block.
The contents of the XML file node are
<map version= "1.0" orientation= "isometric" width= "height=", tilewidth= "" "tileheight=" >
<layer name= "block layer 1" width= "height=" >
<data>
<tile gid= "0"/>
<tile gid= "0"/>
...
<tile gid= "0"/>
</data>
</layer>
</map>
2. Editing Objects
L Object Name
L Object Image Resources
The offset position of the object relative to the surface block
L object property Editing
Some properties of the object are edited as follows: "Name", "Multi-frame graph" and so on.
The contents of the XML file node are
<tileset firstgid= "1" name= "Perspective_walls" tilewidth= "Up" tileheight= ">"
<image source= "d:/tank Grand Battle/Map/perspective_walls.png" width= "" "height=" "/>"
<tileoffset x= "Ten" y= "ten"/>
<tile id= "0" >
<properties>
<property name= "name" value= "House"/>
<property name= "Multi-frame graph" value= "HOUSE-1.XMP"/>
<property name= "effect Diagram" value= "smoke. XMP"/>
<property name= "The offset position of the renderings" value= "4;20"/>
<property name= "shadow map" value= "SHADOW-1.XMP"/>
<property name= "Shadow map offset position" value= "10;20"/>
</properties>
</tile>
</tileset>
3. Edit the map block
L Map block Name
L Map block Image resources
l attribute editing of map blocks
The contents of the XML file node are:
<tileset firstgid= "1" name= "Map block Info" tilewidth= "Up" tileheight= ">"
<image source= "d:/tank Grand Battle/Map/perspective_walls.png" width= "" "height=" "/>"
<properties>
<property name= "Collision" value= "false"/>
</properties>
</tile>
</tileset>
Note: The map block is not drawn in the program, but is displayed in the map editor and is used to specify a surface block.
4. Image Layer
L can add/remove multiple image layers
L Set whether it is visible in the Operation view
L Display the background image of the settings layer
The contents of the XML file node are:
<imagelayer name= "image layer 1" width= "height=" >
<image source= "d:/tank Grand Battle/Map/1-small.jpg"/>
</imagelayer>
5. Block Layer
L multiple block layers can be added/removed
L Set whether it is visible in the Operation view
L Place/delete objects on block layer
L If the object is composed of multiple sub-parts, it can be framed to select multiple objects and put into the scene.
The contents of the XML file node are:
<layer name= "block layer 1" width= "height=" >
<data>
<tile gid= "1"/>
<tile gid= "2"/>
<tile gid= "0"/>
...
</data>
</layer>
6. Object Layer
L Add/Remove an object instance on the object layer
L Edit the properties of the object
L Set whether it is visible in the Operation view
L Simple operation: Ctrl+c,ctrl+v can copy an object
The contents of the XML file node are:
<objectgroup name= "object layer 1" width= "height=" >
<object name= "Hous1" gid= "1" x= "y=" >
<properties>
<property name= "Name" value= "1"/>
</properties>
</object>
<object gid= "1" x= "y="/>
</objectgroup>