Review: Cocos2d for iPhone 1 Game Development Cookbook

“Cocos2d for iPhone 1 Game Development Cookbook” is written by Nathan Burba (@nathanburba).

Cocos2d for iPhone 1 Game Development Cookbook
According to the description, it has “over 90 recipes for iOS 2D game development using cocos2d”. and just by looking at it’s Table of Contents, you’d see that this book covers a lot of topics (some advanced techniques that other cocos2d books have not covered). It also provides solutions to some common problems that we developers might encounter during Cocos2d iOS development.

Like in Chapter 1, it covers graphics, but unlike other books that would only teach you how to make sprites and spritesheets, this book even teaches you how to use apply mipmapping so that that when you scale up or down a sprite it wouldn’t look pixelated. It also has a recipe for a cool technique by swapping palettes so that even with limited amount of art, you can create various versions of a sprite (a single baseball player texture can have be used to create different baseball players with different colored shirts and pants etc). Chapter 1 also answers some questions that you might encounter while working on your game, such as how to I play a video clip of my company’s logo or my game’s cutscene (playing video files recipe). It also covers how to render 3D objects, drawing OpenGL primitives, particles, etc.

Chapter 2 is all about User Input on iOS devices, including the usual (tap, hold, drag), making virtual buttons (creating an analog stick recipe and directional pad recipe) and using the accelerometer. One really cool (for me) recipe that’s also included is gestures (you’d be able to tell what shape the user drew on the screen)!

Chapter 3 is about Files and Data. In making games, we’d need ways to store data (just us score, or level design, etc) and this chapter covers different ways for us to do this. This chapter has recipes for reading plist, json, xml data files, it also includes recipes about archiving objects, saving data using plist, SQLite, Core Data, etc.

Chapter 4 is about physics. Cocos2d has two physics engines that we can use Box2d and Chipmunk. This book only covers Box2d (which is the engine that Angry Birds used), it includes detailed explanations and recipes on how to set up your Box2d environment and simulating physics properties. it even includes a recipe on how to make a car drive up a bumpy hill road!

Chapter 5 is about Scenes and Menus. It also includes how to create buttons and labels (with fancy shadow effects even)! It also has a recipe for wrapping the UIKIT and using it in our Cocos2d game.

Chapter 6 is all about Audio: how to play background sound effects, play music, using the iPod music library. But the really fun bits about this chapter is it even teaches you how to record audio, create a MIDI synthesizer, and to top it all off, it even covers spech recognition and text to speech! Imagine all the games and apps that you can make with those things.

Chapter 7 covers AI, including waypoints, flocking using boids and A* pathfinding. it also teaches you how to run lua scripts and use lua scripts for dialog trees.

Chapter 8 is called Tips, Tools and Ports, and sure enough it includes information about tools that can be used for our Cocos2d game development. Best part, it also includes detailed step by step instructions of how to put your game on the AppStore!

Overall this is a good book with a lot of useful and varied information that have not been covered in other books (and are often lacking in online tutorials). Also
the best thing about this book is it comes with complete working code and detailed explanations on how the code works.

Except some of the topics covered in this book are a bit advanced, so this book is not recommended for beginners, basic Objective C and Cocos2d knowledge is required.

Also the author, Nathan is also very active in the Cocos2d forums, if you have any questions about the book you can just ask him, and he almost always responds immediately.

So if you’re interested to learn new things about Cocos2d iOS development, do check it out! Also if you are interested in this book, I am holding a giveaway contest (where I am giving away 3-4 copies of the book), join now (it’s only until this Wednesday). For more details read my previous blog post (


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s