Cocos2d + Box2d 或花栗鼠
好的,我正在尝试制作我在这里制作的游戏的 iPhone 版本 http://scratch.mit。 edu/projects/techy/781198 是 box2d 还是chipmunk 更好,每个的教程在哪里
OK, im trying to make an iphone version of a game i made here http://scratch.mit.edu/projects/techy/781198 is box2d or chipmunk better and where are some tutorials for each one
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我更喜欢 Box2d - 我认为它比 Chipmunk 更容易理解。这是另一个问题的链接,其中列出了许多有用的资源:
Cocos2d 资源
另外,这里还有一些链接到 cocos2d / box2d 教程:
http:// www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls
http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection -with-cocos2d-iphone
http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part- 12
http://www.raywenderlich.com/505/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-22
Ray 正在制作一本很棒的书,我认为这将是一个很棒的资源:
http: //www.raywenderlich.com/2274/cocos2d-book-and-360idev
http://my .safaribooksonline.com/9780132180863
希望这些有所帮助 - 编码愉快!
I prefer Box2d - I think it is easier to understand than Chipmunk. Here's a link to another question that lists many usefull resources:
Cocos2d Resources
Plus here are a few links to cocos2d / box2d tutorials:
http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls
http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone
http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12
http://www.raywenderlich.com/505/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-22
And a great book Ray is making that I think will be an awesome resource:
http://www.raywenderlich.com/2274/cocos2d-book-and-360idev
http://my.safaribooksonline.com/9780132180863
Hope these help - Happy coding!
Chipmunk 是纯 C 语言,而 Box2D 是 C++。 Chipmunk 还有一组新的 Objective-C 绑定,但它们不能免费用于商业用途。
据我了解,Chipmunk 不支持连续碰撞检测,但 Box2D 支持。这对于防止“隧道”(高速移动时物体稍微穿过彼此)很重要。
归根结底,据我所知,它们都很棒。如果您更喜欢 C++ 而不是 C 或需要连续碰撞检测,您可能应该选择 Box2D。
如果您更愿意使用纯 C 库,请选择 Chipmunk。
我个人使用 Box2D,到目前为止我的体验非常棒。
另外,我认为 Box2D 有一组不同的(可能更大的)关节类型,所以这可能是需要考虑的......
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...
如果您下载了 Cocos2d SDK,其中包含的项目中有 Box2d 和 Chipmunk 的示例。只需打开名为“cocos2d-iphone”的 Xcode 项目并查看 Box2dtest 和 Chipmunkdemo。 Box2d 更强大,但我认为比 Chipmunk 更难使用。
这是 Cocos2d 的网站:http://www.cocos2d-iphone.org/
在此下载:< a href="http://www.cocos2d-iphone.org/download" rel="noreferrer">http://www.cocos2d-iphone.org/download
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