Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / 2D tile maps and Mappy

Author
Message
Nick Stone
11
Years of Service
User Offline
Joined: 27th Jan 2011
Location:
Posted: 3rd Feb 2011 02:13
Hi guy's

After following some of the tutorials im starting to make a small 2D shooter, i have been trying examples for making tile maps and have been somewhat succesfull, but only with differant colored boxes. I am unable to work out how to insert my own graphics into the boxes, I downloaded a program called Mappy and the DBPro Mappy plugins but I cannot figure out how to load my maps into my source code.

Would anyone be able to give me an example or talk me through how to load my maps from Mappy.

Thanks.
Lost Dragon
12
Years of Service
User Offline
Joined: 22nd Aug 2010
Location:
Posted: 5th Feb 2011 00:42 Edited at: 5th Feb 2011 00:44
I don't know how to use Mappy's native map format. The dll I found doesn't have any documentation or examples of how to use it.

You could try something like this though:



I got the comma function from the forum - and probably the loading code too. I think Ianm's utilities has a split function that could replace that and maybe make for easier code.

Your map file will look like:

0,0,0,0
1,1,1,0
23,24,25,0

etc.

To get that format in Mappy I use this Mappy exporter.

I edited my version of the exporter to strip out what I don't want but if you don't want to do that you can just edit the text file it generates to strip out everything except the map data.

I also like the Tiled editor. It has an option to save map data in csv and you can just edit the native map format with notepad to strip out whatever you don't want.

Basically Tiled's native format is an xml file, so if you can figure out how to parse and xml file you have probably figured out how to load a Tiled map.

It is sort of weird that neither one of those map editing tools seems to get that much attention on the forums.

Hope that helps some anyway.

Login to post a reply

Server time is: 2022-12-06 04:48:03
Your offset time is: 2022-12-06 04:48:03