One of the most important weapons in the game developer's arsenal is the level editor . In this recipe we will create a level using the Tiled level editor. We will then create a simple top-down world using this level.
Execute the following code:
//Interface @interface Ch8_Tiled : GameArea2D { CCTMXTiledMap *tileMap; } @end //Implementation @implementation Ch8_Tiled -(CCLayer*) runRecipe { //Load TMX tilemap file tileMap = [CCTMXTiledMap tiledMapWithTMXFile:@"tilemap.tmx"]; //Set game area size based on tilemap size [self setGameAreaSize]; //Superclass initialization and message [super runRecipe]; [self showMessage:@"Use the DPad to move the actor around."]; //Add tile map [gameNode addChild:tileMap z:0]; /* Re-order layers according to their Y value. This creates isometric depth. */ //Our layers CCTMXLayer *collidableLayer...