Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So I currently have my background as a single PNG and some obstacles (like blocks as part of that PNG). In order to create a path, I currently store pixels above a unique green color (my hill) and use this to move the character. My question is, is it better to create something like a collision layer mask or somehow convert my PNG to a bunch of tiles? Is this possible?

share|improve this question

3 Answers 3

up vote 5 down vote accepted

Two programs you should at least take a look at are Mappy and Tiled. A library for XNA integration with Tiled called TiledLib has been developed and could be of some use, if only to take a look at for ideas.

share|improve this answer

Yes, it is strongly suggested that you move to a data driven map, with layers and tiles. It will make your life easier, your maps will be editable in other tools(like map editors). You could even think of randomly generating maps and much much more!

Happy coding!

share|improve this answer
    
Is there any tool that you personally recommend (there are tons of these programs out there). Will I have to start from scratch or can these map editors load a png and then I can just define where my tiles will be? –  Ilya Sep 17 '10 at 20:33
    
@Ilya, Tiled, which @Christopher recommended, does just that, takes a bitmap and uses it for tiles. Give it a try, it's a nice program. –  Cyclops Sep 18 '10 at 18:35

In Stendhal we use several layers of a map: ground, floor, objects, roof, roof_2. This way it is easy to create new maps based on images already created. We use two additional layers that only contain a green or red square called collision and protections.

You may get some ideas from our map tutorial. The map editor "Tiled" is from http://www.mapeditor.org/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.