Looks Level to Me!

Creating and loading tiled levels fast and easily


Having an easy way to load tiles is an important part of making 2D games. When it comes down to it, almost every 2D game you can think of is created with tiles. Whether it's tiles of a scrolling background, tiles for platforms, tiles for an overhead RPG or even just tiles for constructing a PacMan type level. Games need tiles and game developer need a quick and easy way to get them into the game.

 PacManTileI wrote this little project to help with that. I bypassed a level editor and any type of drag and drop UI in favor of a quick and fast way of creating levels. I wanted to focus on getting levels created and loaded into my game in the quickest way possible and this little sample was born. With this sample, you create all of your levels in an XML file. You define what tiles make up your level and assign them a symbol. Then using those symbols, you construct your levels visually in the XML file.

  LostGardenTileI took the time to create some different tiles to show off the code. I even downloaded some awesome free prototyping sprites from LostGarden that I used to create some more visually appealing levels and even demonstrated how you could stack levels to draw multiply layers. Since I won't distribute them with my download, if you want to see them in action, you'll have to download them yourself and add them to the project (I left the code and the .xml file I used in the sample).

Hopefully this is something that can be useful for you. I've already managed to find several places where it's help me prototype something very quickly. You create levels simply by editing the XML file which is a very fast way of creating levels. Have fun and let me know what you think!

Technorati Tags: