oooh ... you know the old Dizzy collection?
yes, that's treasure island dizzy. Loved the Dizzy serie ... like 10 -14 years ago
About the map, here's what i did.
a XML file with all the tiles that can appear inside a map:
i.e.
<Categories>
<Category ID="0" Name="Earth"></Category>
<Category ID="1" Name="Fire"></Category>
<Category ID="2" Name="Air"></Category>
<Category ID="3" Name="Water"></Category>
</Categories>
<Items>
<Item ID="0" CatID="0" Name="Grass1" Img="img/Ice1.jpg"></Item>
<Item ID="1" CatID="0" Name="Grass2" Img="img/Ice2.jpg"></Item>
<Item ID="2" CatID="0" Name="Grass3" Img="img/Ice3.jpg"></Item>
<Item ID="3" CatID="0" Name="Grass4" Img="img/Ice4.jpg"></Item>
<Item ID="4" CatID="1" Name="Fire1" Img="img/Ice5.jpg"></Item>
<Item ID="5" CatID="1" Name="Fire2" Img="img/Ice6.jpg"></Item>
<Item ID="6" CatID="1" Name="Fire3" Img="img/Ice7.jpg"></Item>
<Item ID="7" CatID="1" Name="Fire4" Img="img/Ice8.jpg"></Item>
</Items>
- <Categories>
- <Category ID="0" Name="Earth"></Category>
- <Category ID="1" Name="Fire"></Category>
- <Category ID="2" Name="Air"></Category>
- <Category ID="3" Name="Water"></Category>
- </Categories>
- <Items>
- <Item ID="0" CatID="0" Name="Grass1" Img="img/Ice1.jpg"></Item>
- <Item ID="1" CatID="0" Name="Grass2" Img="img/Ice2.jpg"></Item>
- <Item ID="2" CatID="0" Name="Grass3" Img="img/Ice3.jpg"></Item>
- <Item ID="3" CatID="0" Name="Grass4" Img="img/Ice4.jpg"></Item>
- <Item ID="4" CatID="1" Name="Fire1" Img="img/Ice5.jpg"></Item>
- <Item ID="5" CatID="1" Name="Fire2" Img="img/Ice6.jpg"></Item>
- <Item ID="6" CatID="1" Name="Fire3" Img="img/Ice7.jpg"></Item>
- <Item ID="7" CatID="1" Name="Fire4" Img="img/Ice8.jpg"></Item>
- </Items>
And in the saved map i only keep the ID of the used item. Of course, that's why i made an editor too, i don't change them by hand
map0=-1;3;3;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;3;-1;-1;14;14;-1;-1;-1;-1;-1;-1;3;3;-1;-1;-1;-1;14;3;3;3;-1;-1;-1;-1;-1;-1;14;-1;-1;-1;-1;-1;-1;-1;-1;-1;6;3;3;-1;-1;-1;-1;-1;-1;6;-1;-1;-1;-1;-1;-1;-1;3;1;1;1;-1;3;3;3;-1;-1;6;-1;-1;-1;-1;-1;-1;-1;-1;3;-1;-1;-1;34;34;34;34;1;-1;-1;6;6;6;6;-1;-1;-1;-1;-1;-1;6;6;-1;-1;-1;-1;-1;-1;-1;-1;6;-1;6;6;-1;-1;-1;6;6;6;6;-1;6;
&mapattributes0=15;0;0;15;15;15;15;15;15;15;15;15;15;15;15;0;15;15;0;0;15;15;15;15;15;15;0;0;15;15;15;15;0;0;0;0;15;15;15;15;15;15;0;15;15;15;15;15;15;15;15;15;0;0;0;15;15;15;15;15;15;0;15;15;15;15;15;15;15;0;12;0;0;15;0;0;0;15;15;0;15;15;15;15;15;15;15;15;0;15;15;15;0;0;0;0;0;15;15;0;8;0;0;15;15;15;15;15;15;0;0;15;15;15;15;15;15;15;15;0;15;0;0;15;15;15;0;0;0;0;15;0;
&mapImage0=img/bg.jpg
- map0=-1;3;3;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;3;-1;-1;14;14;-1;-1;-1;-1;-1;-1;3;3;-1;-1;-1;-1;14;3;3;3;-1;-1;-1;-1;-1;-1;14;-1;-1;-1;-1;-1;-1;-1;-1;-1;6;3;3;-1;-1;-1;-1;-1;-1;6;-1;-1;-1;-1;-1;-1;-1;3;1;1;1;-1;3;3;3;-1;-1;6;-1;-1;-1;-1;-1;-1;-1;-1;3;-1;-1;-1;34;34;34;34;1;-1;-1;6;6;6;6;-1;-1;-1;-1;-1;-1;6;6;-1;-1;-1;-1;-1;-1;-1;-1;6;-1;6;6;-1;-1;-1;6;6;6;6;-1;6;
- &mapattributes0=15;0;0;15;15;15;15;15;15;15;15;15;15;15;15;0;15;15;0;0;15;15;15;15;15;15;0;0;15;15;15;15;0;0;0;0;15;15;15;15;15;15;0;15;15;15;15;15;15;15;15;15;0;0;0;15;15;15;15;15;15;0;15;15;15;15;15;15;15;0;12;0;0;15;0;0;0;15;15;0;15;15;15;15;15;15;15;15;0;15;15;15;0;0;0;0;0;15;15;0;8;0;0;15;15;15;15;15;15;0;0;15;15;15;15;15;15;15;15;0;15;0;0;15;15;15;0;0;0;0;15;0;
- &mapImage0=img/bg.jpg
where map0 -> first map (can continue with map1, map2 ... but this in my case or you can use this too to split a bigger map in smaller parts) -> holds the ID's of the items. -1 represents a free tile, with no image, only the background will be seen.
mapattributes0 -> holds the information for each tile, telling if the tile can be stepped through and from which way. 0 means a solid block, no access through it, 1 -> can pass from left, 2-> can pass from right, 4-> from top; 8->from bottom. Combinations of these can be made (adding them), so 1+2+4+8 = 15-> access from all sides -> this will be for the free tiles.
mapImage -> the map background (this is only my case for you can't have a huge background in your game)
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”