Game Development with Cocos2d and Chipmunk

I've been experimenting with the Cocos2d and Chipmunk libraries for the iPhone recently. They are completely awesome and are proving to be a great help for me while developing the game I've been working on. These are both 3rd party libraries that you can put into xCode and start utilizing by making function calls very similar to the way you use UIKit. Cocos2d is very powerful and optimized for gaming. As of writing this 2 of the top 10 iPhone apps are written using Cocos2d. The number one app, Game Doctor's, Zombie Smash is a great example of Cocos2d working alongside Chipmunk. Chipmunk is a physics engine that handles things like collision detection and has libraries for things like joints and pivoting. It appears as if Zombie Smash uses Chipmunk to make the cool ragdoll effects of the zombies.

It is a little rough to get started with Cocos2d but with some persistence you will soon thank yourself. The best way to get started is to download the most recent stable version, currently 0.99.1, at http://www.cocos2d-iphone.org/download. Open up your terminal and navigate to the folder you just downloaded and type the follow command.


$ ./install_template.sh

What this simple script does is install 3 templates for you to use so all you need to do is simply open xCode and start a new project. You now should see the Cocos templates.

After launching one of those, I prefer Chipmunk, check out the API and then start making your awesome game!