
INTRODUCTIONxviii
by Dave Mark and Jeff LaMarche, or possibly you have already completed a simple app and
you’re ready for the next step on your journey.
It also helps to be comfortable with Cocoa Touch, basic Xcode tools, and Objective-C. You
can pick up extra help from “Learn C on the Mac” by Dave Mark, “Expert C Programming”
by Peter van der Linden, and “Learn Objective-C for the Mac” by Mark Dalrymple and Scott
Knaster.
Mostly, this book is for anyone who wants to write better apps for iPhone and iPod touch
and is willing to put in a little time to learn from some of those who have already succeeded
at it.
What’s in the book
We open with Wolfgang Ante, the developer behind the Frenzic puzzle game, showing how
the game was developed and guiding us through the process of creating a similar game
called Formic. Timers, animation, and intelligence are used to make the play engaging. If you
have been wanting to write a game but have had difficulty getting started, this chapter will
provide the guidance and inspiration you need!
Chapter 2 finds Rogue Amoeba’s Mike Ash explaining how to design a network protocol
using UDP, and demonstrating its use in a peer-to-peer application. This topic is not for the
faint of heart, but Mike explains it in a way that makes sense to us mere mortals. I had never
seen this topic covered before, so I’m thrilled to see it here.
Next up with Chapter 3 is Gary Bennett covering the daunting but important task of multi-
threading. The CPUs in the iPhone and iPod touch won’t be mistaken for those of the Mac
Pro, but they pack enough power that frequently they are waiting for something to do.
Multithreading can be used to keep the user interface responsive while working on other
tasks in the background. Gary demonstrates how to do this, and highlights traps to avoid
along the way.
In Chapter 4, Canis Lupus (a.k.a. Matthew Rosenfeld) describes the development of the
Keynote-controlling application Stage Hand, how the user interface evolved, and the lessons
learned from that experience. This knowledge is then demonstrated in a project showing
how to recognize many complex gestures at once, including flicking (with inertia!) and rotat-
ing an object. Remote controls should all be this handy.
Benjamin Jackson introduces us to two open source libraries in Chapter 5: cocos2d for 2D
gaming, and Chipmunk for rigid body physics (think “collisions”). He describes the develop-
ment of Arcade Hockey, an air hockey game, and explains some of the code used for this.
Benjamin then guides us through the creation of a miniature golf game. It’s definitely helpful
to have such clear guidance through these very murky waters.