O'Reilly logo

iOS Game Programming Cookbook by Bhanu Birani, Chhavi Vaishnav

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating our TankRace environment

The name of the game itself suggests that it's a racing game, where there will be two players and tanks named the blue tank and the red tank. The tanks will be placed on either side of the screen in the portrait mode on the iPhone and there will be two finishing lines, a blue line and a red line, to be crossed by blue tank (let's say first player) and red tank (let's say second player) respectively. The movement of player will be a touch based behavior and the player whose tank crosses their finish line first will win and the other will lose. We will be creating the environment for the game, TankRace, which will include adding players, game background, and finishing lines.

Getting ready

In the previous chapters, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required