What do you need to know to create a game for the iPhone? Even if you've already built some iPhone applications, developing games using iPhone's gestural interface and limited screen layout requires new skills. With iPhone Game Development, you get everything from game development basics and iPhone programming fundamentals to guidelines for dealing with special graphics and audio needs, creating in-game physics, and much more.

Loaded with descriptive examples and clear explanations, this book helps you learn the technical design issues particular to the iPhone and iPod Touch, and suggests ways to maximize performance in different types of games. You also get plug-in classes to compensate for the areas where the iPhone's game programming support is weak.

Learn how to develop iPhone games that provide engaging user experiences

Become familiar with Objective-C and the Xcode suite of tools

Learn what it takes to adapt the iPhone interface to games

Create a robust, scalable framework for a game app

Understand the requirements for implementing 2D and 3D graphics

Learn how to add music and audio effects, as well as menus and controls

Paul Zirkle

Paul Zirkle has five years of mobile game programming experience and is currently a Lead Mobile Programmer at Konami Digital Entertainment. He has worked on over 40 titles, including porting, re-writing and full development. Occasionally, Paul is called upon to give lectures on game development at the University of Southern California.

Joe Hogue

Joe Hogue has five years of mobile game programming experience. He worked with Paul at Konami and currently works for Electronic Arts as a Mobile Programmer. Joe has worked on over 40 titles as well, including porting, re-writes and full development. Joe has written an iPhone game that is currently being submitted to the iTunes AppStore.

The animal on the cover of iPhone Game Development is a greater roadrunner (Geococcyx californianus), a long-legged bird belonging to the cuckoo family. It is the largest North American cuckoo at approximately 22 inches long, and it weighs about 10 ounces. It has a dark head and back, an oversized beak, a long tail, a pale belly, and four toes on each foot.It is found in the Mojave, Sonoran, and Chihuahuan deserts as well as in other parts of the southwestern U.S. It is well adapted to desert life for a number of reasons, including the fact that it reabsorbs water from its feces before excretion; it is quiet during midday, which is the hottest time in the desert; and it is very fast and can catch prey while it is in mid-air. Although it can fly, it would rather sprint and can run as fast as 20 miles per hour.The roadrunner's diet primarily consists of insects, small reptiles, rodents, small birds, fruit, and seeds. Its incredible speed enables it to also prey on rattlesnakes. It grabs a coiled rattlesnake by the tail and slams the snake's head against the ground until it dies. The roadrunner then consumes the snake whole, but oftentimes can't eat it all in one sitting, so the bird will go about its day with the remaining snake hanging out of its mouth until what it has previously eaten has digested and it is ready to consume more.

As an iOS video game programmer I began 2 years ago by reading this book. It walks you through all the theory involved in creating your own 2D and later 3D game engine. Yeah sure, some of the code is outdated now. But it's easy to figure out the changes if you really want to. Function names don't change *that* much. So if you have half a brain, this book is decent. It is a good base. I spent 2 months reading this book every day. Now when I use professional game engines I know what is going on and why.

This is a great book - or, at least, was a great book. It's examples, code, and SDK design considerations are all outdated now. The Safari game (if downloaded) plays fine on the iPhone 3Gs, but breaks on the iPhone 4 because of the resolution. (The resolution of the screen is hard-coded into the source.)

These changes over time are not the fault of the authors, but rather, Apple's changes to the SDK and product line.

What we really need is to retire this book and give us a 2nd Edition for iOS 4.x. I want to see O'Reilly's Safari Adventure for iPad!

The code as written in the book is completely different from the downloadable examples, neither of which will compile. I was loving this book until halfway through Chapter 3 when the code ceased to work. I would love an updated version with working examples, but as it stands I'm not even convinced somebody read this before going to press. This is NOT up to O'Reilly's otherwise impeccable standards. It has left me weeping over a pile of broken code and broken dreams.

This was a perfect book for me because I had a nearly complete but unreleased game written in Java. This book tells how to build a game using the tile world format which is how I had programmed my game in Java. The format is so similar I was able to write a converter for my previous maps and use them in my iPhone version. Within a week I had a version of my game running on an iPod touch. I can understand people's frustrations because I had to spend a lot of time reading the code and re-reading the chapters. But I do have my game running on the hardware and truly hope to release it this year on the app store. I also have three other iPhone programming books and I have had to draw upon all of them. This was the hardest of all my books but the one that was most valuable for me. It doesn't work well as a general introduction but for a tile world/platformer type game it has great information.

A book about programming games where the authors are unable to string two lines of code together so that the reader can actually implement the code themselves.

DON'T BUY THIS BOOK.

It seemed like a really great book and I'm sure it's a lot of fun but you can't actually use it unless you're simultaneously trying reading the corrections document and the book -- Even then I can't follow the code.

The book is well written with good examples, but the first chapters where the reader is supposed to build a framework contains many errors (such as invoking graphics functions on the wrong thread). I spent a lot of time figuring out the code and was surprised to see that the downloadable code was completely different. What started out as a beautiful framework, turned out to be non-functional, and when all the errors had been corrected it felt unnecessary.

It is not true what the editor says below: that the code is functional if the reader follows the book from page one to the end.

As others have noted, the sample code that can be downloaded is a lot different than that in the book. But the WORST part? - If you download the code for the Chapter 4 game it builds just fine in XCode. But as soon as it launches in the iPhone Simulator, it CRASHES! I can't even put debug breakpoints in the code. As soon as the background for the game appears (the buttons have not yet been displayed) the app crashes with a bad memory access error that I can't track down! But where does it crash?? I can't figure out where to look! As I mentioned, even if I put a breakpoint on the first line of main(), it never reaches that breakpoint! Argghhh!If the authors are going to supply code, they should at least make sure it WORKS before releasing it. As I stated, it BUILDS just fine, but does NOT run! If I could get the code to actually run, so I can step through it, I would gladly increase my rating of of this book.If any of you have got it to run, please let me know! You can reach me at [@]

Yes - there are source code errors, but they're all listed in the downloadable source, and the fact it doesn't all compile straight away means you have to think about it!The book has lots of really good ideas that I haven't seen in other books, and gets straight to the heart of game development almost immediately using an excellent approach you can use time and again.This isn't all about how to use the XCode IDE to create simple apps, it's all about code. You will need previous programming experience before reading this book (C++ or Java probably).

Chapters 4 and 5 source code will not compile and run. This is a bit annoying seeing as the chapters start off by telling you to download the source code. Are we expected to copy and paste the code from the files into our own projects to make it work? This is not good.

It is really hard to understand the first examples from this book. I spent a half of a day to understand them. But now it is clear for me. I have some ideas how to improve this book and I can help to solve your problems.