Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.
This is the Rough Cut version of the printed book.
Get Started Fast with iOS Game Programming
Since the launch of the App Store, games have been the hottest category of apps for the iPhone, iPod touch, and iPad. That means your best chance of tapping into the iPhone/iPad “Gold Rush” is to put out a killer game that everyone wants to play (and talk about). While many people think games are hard to build, they can actually be quite easy, and Learning iOS Game Programming is your perfect beginner’s guide. Michael Daley walks you through every step as you build a killer 2D game for the iPhone.
In Learning iOS Game Programming, you’ll learn how to build a 2D tile map game, Sir Lamorak’s Quest: The Spell of Release (which is free in the App Store). You can download and play the game you’re going to build while you learn about the code and everything behind the scenes. Daley identifies the key characteristics of a successful iPhone game and introduces the technologies, terminology, and tools you will use. Then, he carefully guides you through the whole development process: from planning storylines and game play all the way through testing and tuning.
Download the free version of Sir Lamorak’s Quest from the App Store today, while you learn how to build the game in this book.
Coverage includes
Learning iOS Game Programming focuses on the features, concepts, and techniques you’ll use most often—and helps you master them in a real-world context. This book is 100% useful and 100% practical; there’s never been an iPhone game development book like it!
Praise for Learning iOS Game Programming
“An excellent introduction into the world of game development explaining every aspect of game design and implementation for the iPad, iPhone, and iPod touch devices. A great way for anyone interested in writing games to get started.”
–Tom Bradley, Software Architect, Designer of TBXML
“A great developer and a great game.That’s everything you can find in this book to learn how to write an awesome game for iPhone.Maybe you’re the next AppStore hit!”
Preface xxi
1 Game Design 1
The Game That Started It All (For Me) 3
So, What’s the Big Idea? 4
A Game That Fits with the iPhone 4
The Storyline 5
What’s in a Name? 5
The Game’s Objective 6
Game Play Components 7
Time 7
Lives 7
Health 8
Objects 8
Doors 9
Weapons 10
Entities 10
Player 11
Summary 11
2 The Three Ts: Terminology, Technology, and Tools 13
Terminology 14
Sprite 14
Sprite Sheet 16
Animation 18
Bitmap Fonts 19
Tile Maps 20
Particle System 21
Collision Detection 22
Artificial Intelligence (AI) 23
Game Loop 24
Technology 26
Objective-C 26
Cocoa Touch 27
OpenGL ES 27
OpenAL 30
Tools 31
The iPhone SDK 32
Summary 38
3 The Journey Begins 39
Creating the Project in Xcode 39
Running the Project 42
Under the Hood 43
Application Delegate 43
Examining the Header File 44
Examining the Implementation File 46
EAGLView 49
EAGLView.h 49
EAGLView.m 50
ES1Renderer 58
Examining ES1Renderer.h 58
Examining ES1Renderer.m 59
Creating the Framebuffer and Renderbuffer 60
Defining the Color Values 66
