Game Development Reference
the way they are. This topic will focus not just on working game code but also on why
it works and which trade-offs to consider.
I would like you to learn how to write games that matter—games that are popular on
the App Store and relevant to players. I'll walk you through the ideas and technical
concepts behind these games in this topic and, of course, how cocos2d and Objective-C
make these games tick. You'll find that the source code that comes with the topic is en-
riched with a lot of comments, which should help you navigate and understand all the
nooks and crannies of the code.
Learning from someone else's source code with a guide to help focus on what's import-
ant is what works best for me whenever I'm learning something new—and I like to
think it will work great for you too. And because you can base your own games on the
topic's source code, I'm looking forward to playing your games in the near future!
Don't forget to let me know about them!
You can share your projects and ask questions on Cocos2D Central ( www.cocos2d-
should definitely visit the topic's companion web site at www.learn-
the Kobold2D project, which you can also use while reading this topic. You can learn
What's New in the Third Edition?
This third edition is a complete overhaul to bring the topic up to date with the latest de-
velopments, including but not limited to iOS 6 and Xcode 4.4.
For one, cocos2d 2.0 is fresh out of the box. All the source code and descriptions have
been adapted to the latest incarnation of cocos2d and OpenGL ES 2.0. Although you
cannot deploy cocos2d 2.0 apps on 1st- and 2nd-generation devices, in March 2012
these devices only made up about 16% of all iOS devices sold thus far. There's no
doubt that by the time you're reading this topic this number will have gone down to
around 10% and be still falling as the newer devices continue to sell at an ever increas-