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?
|
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. |
||||
|
|
|
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! |
|||||
|
|
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/ |
|||
|
|
