Book Image

iOS Game Programming Cookbook

Book Image

iOS Game Programming Cookbook

Overview of this book

Table of Contents (19 chapters)
iOS Game Programming Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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, you have learned all about adding sprites and backgrounds and updating their attributes like position, rotation, and so on. Now, we will be adding all the assets needed in the game to make it playable.

How to do it

The steps to add all the assets required...