-
Notifications
You must be signed in to change notification settings - Fork 0
Flare map
Nordsoft91 edited this page Nov 12, 2015
·
2 revisions
MagicWars engine supports Flare map format. Flare map can be created with Tiled software
Flare map is a text file contains all neccessary infomation to create game objects
Common file structure
[header]
width = <val>
height = <val>
tilewidth = <val>
tileheight = <val>
<some additional parameters, unused in MagicWars>
[tilesets]
tileset = <tileset name>,<param1>,<param2>,<param3>,<param4>
tileset = <tileset name>,<param1>,<param2>,<param3>,<param4>
...
[layer]
type = <layer1 name>
data = <array i,i,..., contains tiles indexes size should be width*height>
[layer]
type = <layer2 name>
data = ...
<can contain any number of layers>
All tiles in MagicWars must be 64x64 pix, so tilewidth and tileheight parameters should be equal 64
MagicWars maps should have determine sizes:
- Extra small map (XS): 8x8 tiles
- Small map (S): 16x16 tiles
- Medium map (M): 24x24 tiles
- Large map (L): 32x32 tiles
- Extra large map (XL): 40x40 tiles
- World map (H): 64x64 tiles
Text map could be parsed by Flare engine in MagicWars and be represented with special classes
Flared_NS::Map map;
Flared_NS::Parser parser("example_map.txt"); //parse text file
parser.construct(map); //represent structure into inner format
cocos2d::Node* node = map.getMapTree(); //get nodes tree