Introduction
If you're trying to get into game development for the iPhone, or some other platforms, you might have heard of Chipmunk as a 2D physics engine. Chipmunk is very fast, easy and independent of the graphics engine of your choosing. Personally, I use Cocos2D as a game engine but Chipmunk can be used with everything or even nothing (i.e. no graphics) provided you want to work with 2D physics and rigid bodies.
Chipmunk features are many and flexible, in this article I'll try to teach the basics to a point where you can continue on your own. I'll be using Objective C, C and XCode during the article, and while I won't be using Cocos2d or other game engines for the sake of keeping things simple, it will only be understandable if you at least have some experience with iPhone development.
What will we do and learn during this tutorial?
We'll begin by learning the basics of Chipmunk and by setting up a test project. From there we'll keep extending the project until we achieve the end result, our first complete Chipmunk simulation. Here's a preview of the results:
Though not an amazing finish, at the end of this tutorial you should have all the basic knowledge to do basic simulations and even apply all concepts of this tutorial to do your first game.
Before we start
If you find a spelling/grammar error, bug in the code or have any other suggestions or improvements, feel free to get in touch with me using my contacts page.
If you find this article useful and enjoy it, consider donating, even a small amount goes a long way to keep the articles up-to-date and to fund new ones. Donating is simple, you can donate using the Paypal's "Donate" button at the right of each article's page or by buying one of my applications.