Cocos2d for iPhone 1 Game Development Cookbook Review
Mar 02, 2012—
OverviewIDE. It is a cookbook style (as the title states) introduction to using Cocos2d in your future iOS games. You can download the source code found in the book on the publisher’s website.
This book covers everything you need to know to use Cocos2d in your games. It starts off right away with drawing sprites to the screen, perhaps the most important of recipes in the book. It also covers how to take user input in a variety of fashions, from on-screen d-pads and “analog” sticks, to accelerometer controls.
The recipes in this book are well written and structured, easy to understand. The recipes follow a simple format of explaining what they are going to do, usually with some screenshot to illustrate their point. This is followed by the source code to implement it. The code is commented and step-by-step descriptions follow the code describing what new methods and classes do. Methods and their parameters are clearly explained, as well as value ranges and typical choices.
These recipes also extend past just Cocos2d features. The chapters “Physics” and “AI and Logic” cover topics that are useful to any game developer. The Box2D physics system is explained with useful techniques, A* pathfinding is explained, and even Lua scripting. These extra tidbits are very useful for any developers looking to make better games.
Strange for a development book to mess this one up as it’s probably the most important part of the book, but the code formatting is just a bit ugly. I’m not sure what font they chose but it seems like it got stretched a bit. Also some code lines wrap on to a new line with no special formatting at all. Perhaps it was simply the review ebook version I received, and I assume they will fix it in a future version.
This is a cookbook style development guide, so it can’t cover everything, but there are occasions where you want to know more information that you will have to figure out yourself. This can be a good thing though! The best way to learn is through your own experimentation.
- User Input
- Files and Data
- Scenes and Menus
- AI and Logic
- Tips, Tools and Ports
About the Author
Alex Sikora has been a member of iDevGames since 2003. He is a student at the University of Illinois, currently majoring in Computer Science. He works at a startup in Chicago making iOS applications, and makes games in his spare time.