Hi, this is Pablo Ruiz, author of Cocos2d for iPhone 0.99 Beginner’s Guide book. It is published by Packt Publishing for a series of opensource related books.
The book is aimed towards people who are just beginning with Cocos2d. When I began working with Cocos2d, around mid 2009, there wasn’t much reference material, just the Sapus Tongue source code and a couple of tutorials around the internet. So, at that time there were lots of post in the forums of people needing help getting started, how to work with the samples, how to get their first app to build and so on. So what I wanted to do is to fill that space, to write a book that would help people get started with this great framework.
This book is designed to get you familiarized with Cocos2d for iPhone, allowing you to build your own games. To that end, the book is organized in easy-to-follow examples. Through the book we’ll be building 3 different types of games that exploit all the power Cocos2d has.
Chapter 1 – Getting started with Cocos2d
We’ll start by taking a look at the sample projects that are included in the source. Then you will learn how to install the templates to easily start a new project and then you’ll make your first simple project. We’ll also talk about some Cocos2d basic concepts.
Finally we’ll take a look at the debugging features of Cocos2d.
Chapter 2 – Playing with Sprites
In this chapter you will learn all there is to Sprites. By the end of the chapter you will be able to create and manage your own objects.
We’ll also start building the first of the 3 games we’ll make in the book. We’ll take a look at how to begin developing a simple puzzle game.
Chapter 3– Let’s do some actions
Cocos2D Allows you to move, scale, tint and apply a lot more of effects to objects over time. In this chapter we’ll continue enhancing the first game to make it look nicer.
Chapter 4- Pasting Labels
Every game needs to show some text at some point. It could be an instruction text, hints, scores or a lot of things. In this chapter we will take a look at all the ways Cocos2d has to place texts on the screen and modify them.
Chapter 5 – Surfing through Scenes, layers and transitions.
Scenes and layers are where all the content of Cocos2d games is placed. Your game may consist in just one Scene with one layer, or as many as you want! In this chapter we will get into the details of how to make the best use of them, switch between scenes with Transitions and also how to handle accelerometer and touch input on the layers.
Chapter 6 – Menu design.
Menus are a very important part of any game. Cocos2d comes with several ways to create them. It even let’s you animate them like you would animate any other Sprite. In this chapter we will also talk about saving preferences and loading them back.
Chapter 7 – Implementing particle systems
What would be a game without some flashy effects? In this chapter you will learn how to implement the existing particle systems that are included in Cocos2d and you will even create your own.
Chapter 8 – Familiarizing yourself with Tilemaps
Tilemaps are used to create big levels while using small images to create the maps. You can use tilemaps to create games like Shrumps, platform games or RPGs quite easily. In this chapter we are going to take a look at how to create these tilemaps with Tiled and how to load and manipulate them with Cocos2d.
Chapter 9 – Playing sounds with CocosDenshion
Almost every game needs to play sounds and music. Cocos2d includes a great sound engine for all your sound needs. You will be using background music and sound effects in no time after reading this chapter. Here we will also learn some preloading techniques.
Chapter 10- Using physics engines
A lot of games that have come out lately make use of physics engines. This engines allow games to behave like they would in real life. Cocos2d can be integrate with Chipmunk and Box2d, 2 great physics engines. In this chapter you will learn how to use chipmunk in any game you want.
Chapter 11 – Integrating Cocos2d with OpenFeint
Once you have completed your game there is a lot to be done. You may want to add social aspects to it like leaderboards or achievements, how about allowing users to post their scores to Facebook and Twitter? In this chapter we will take a look at the basics of making your game reach the entire world.
The book contains 3 different games that demonstrate the Cocos2d capabilities in all areas of game development.
The first game is a puzzle game sort of Bejewelled, where the reader is taught how to get Cocos2d running, adding Sprites and running actions on them.

The second game is an action game, 1942 like, where the reader learns how to add new Scenes and Layers, how to add menues, Particles and Tilemaps.

Finally, the 3rd game is an small skeleton of a Physics-based game where the reader can start working with Chipmunk Physics Engine and finally integrate OpenFeint to his games.

As the book is supposed to be short, it doesn’t cover the basics of Objective-C nor game design guidelines. So some experience with the language and with game development in general is desired.
The source code hasn’t been published yet, but as soon as they give me the link I will update the post.
You can buy both the print and digital versions from here:
I hope you like the book, and if you have any inquiries don’t hesitate to contact me.
Cheers,
Pablo
About the author: I am the CEO and Co-Founder of InfinixSoft, a company based in Argentina dedicated to Software development focused on iOS apps and games. At InfinixSoft, I have worked with my team on several big projects like Strawberry Shortcake game for Soma Creates, TapStore for Streetview Labs and Kurt Warner’s Football 101 for Good Sports Gang LLC.
You can find me around the forum (and most social networks) by the username pabloruiz55.







I’d like to thank the author for writing this book, and commend him on his effort. Unfortunately, I cannot recommend this book in it’s current form to anyone. I have tried to overcome the many errors that I’ve come across, but by the end of the second chapter(about one third of the book), I am getting more and more frustrated.
This is definitely not worth the price I paid(approx. $40), and I wouldn’t feel confident having a printed version of this book in my library. I would literally have to annotate the book profusely to make it accurate enough to use. At this point I am requesting a refund or return of this book from the publisher.
Again, nothing against the author, I am sure he worked very hard on this book. While the macroscopic lessons of game design(in a coding sense) succeeds, the foundation fails, and fails spectacularly. My advice: proof read your book, test out the printed examples, and fire your editor.
Hello all,
I also bought the book, and been trying to work around the secound chapter.
I’m stuck in pages 60-61. When i run, i cant swap the stones, it just freezes and goes back to the iphone menu.
Can someone help me with that?
Thanks in advance
Unfortunately I must agree with the other posts about this book, I am also ‘stuck’ in the 2nd chapter of the book. Actually stuck isn’t the right word, I’m to annoyed by the lack of any checks about the printed code to go read through all the downloadable code so I might find the solution (although the code I got from the website is really different from the book).
Even in the first chapter the errors start while letting the reader type a piece of code, and then explaining the previously written code which is often different from the code the reader actually typed into the editor.
I’m quite confident this book could become a really good book after some more editorial checks of the code and sometimes a bit of extra explaining of the functions being used. I don’t really need a writer to explain me how 2d arrays work (although it is nice he does), I’d rather know what some of the essential framework functions like initWithGame do and how they work.
I think I’m going to ask a refund as well, unfortunately I’ve bought both the eBook and paperback version so that is probably gonna be a lot of work. I hope the writer is working on a 2nd version of the eBook, it is really needed.
I’m also stuck on chapter two. But I cant even get it to run.
I get an error about the program not able to load sBlue.png or sYellow.png.
Theres no where in the code where it tells me to load those images.
The code download from the book runs okay.
mejor dense de alta como Apple dev.
Hi Pablo:
I think it’s a great book, but remember it’s for beginners, so make it easier for them, so you can update the code on the site with comments i.e. “you must add the images sBlue.png, etc to the resources”, the deprecated lines “detachInView” and “setPixel. ” replace with :
// Create the EAGLView manually
EAGLView *glView = [[EAGLView alloc] initWithFrame:[window bounds]
pixelFormat:kEAGLColorFormatRGBA8
depthFormat:GL_DEPTH_COMPONENT24_OES
preserveBackbuffer:NO];
// attach the openglView to the director
[[CCDirector sharedDirector] setOpenGLView:glView];
// make the OpenGLView a child of the main window
[window addSubview:glView];
etc, I really like your book, I survive to 2nd chapter… I hope you re-cheked all, and we waiting for the next “advanced guide for cocos2d”
good book!
Hey, guys, if you want to buy the book it’s 30% this month at Packt: http://link.packtpub.com/c65cvt
Got to agree with the people having problems with this book. Lots of inconsistencies in the example code, I had to pretty much guess my way through chapter 2 and now I’m stuck dead on chapter 3. I know more now than I did when I started reading, which is to say I know *something*, but this book doesn’t appear to have been checked or reviewd at all prior to release.
how do you get past the semantic error because of Xcode 4?