Box2D Ragdoll Example Screenshot

Box2D: Ragdoll example for Cocos2D

Hi everybody!

Unlike my previous posts, I’m not going to present you a tutorial.
I would share with you an example that I ported from Box2DAS3 to Cocos2D namely the rag doll test.

Before we go any further, let me explain a bit what is Cocos2D and Box2D:


Cocos2d for iPhone is a framework for building 2D graphical and interactive applications in Objective-C. It provides high-level APIs on top of Open-GL ES to allow developers to create animations, transitions or effects easily. It’s mainly used for games. For more information you can visit the official site:


Box2D is an open source 2D physics engine written in C++. It allows the game to simulate a real-time physics world with the management of collisions, forces (like the gravity), motion and many more. Don’t hesitate to read the official documentation here to learn more about it here:

To help me to understand how worked Box2D and to know how to use it with Cocos2D, I had decided to port the Ragdoll example from the Box2DAS3 project to Cocos2D. I took the opportunity to add the management of the multi-touch and the accelerometer to allow people to enhance their user experience.

Finally, you can download it on my github.

I plan to add new examples soon. I’ll keep you in touch.

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.67 out of 5)

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditPin on Pinterest

One comment

Time limit is exhausted. Please reload CAPTCHA.