Cocos2d + Box2d or Chipmunk [closed]

断了今生、忘了曾经 提交于 2019-12-02 15:16:32

If you download the Cocos2d SDK, in the included project is a sample of Box2d and Chipmunk. Just open the Xcode project called "cocos2d-iphone" and look Box2dtest and Chipmunkdemo. Box2d is more powerful, but I think a little harder to use than Chipmunk.

Here's the site for Cocos2d: http://www.cocos2d-iphone.org/

Download here: http://www.cocos2d-iphone.org/download

Chipmunk is straight C, while Box2D is C++. There is also a new set of Objective-C bindings for Chipmunk, but they are not free to use commercially.

As I understand it, Chipmunk does not support Continuous Collision Detection, but Box2D does. This is important to prevent "tunneling" (objects passing slightly through eachother when moving at high speeds)

At the end of the day, from what I hear, they're both great. If you prefer C++ to C or need continuous collision detection, you should probably choose Box2D.

If you'd rather use a pure C library, go with Chipmunk.

I personally use Box2D and my experience has been fantastic so far.

Also, I think Box2D has a different (possibly larger) set of joint types, so that could be something to consider...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!