Level design and implementation
This is where we can have a lot of fun! We are now going to start designing our levels. You can spend hours adding the little details to each level to make them look perfect. Remember, a well-designed level will impress players and will give your game a professional look.
Unfortunately, Xcode just doesn't have the drag-and-drop ease of level design, so we are going to create our maps using a third-party program called Tiled Map Editor, which can be downloaded for free at www.mapeditor.org.
I have included a sprite sheet for our levels as well as a built level in the Resources section of this book. Do you remember the JSTileMap
library that was included as well in this chapter? It's what is going to display these maps as SpriteKit doesn't support TMXTileMaps. So sad!
Anyway, moving on! Open up the level I have included, entitled level1.tmx
, and get a feel for how the program works.
The side bar of Tiled shows you the different layers of the levels...