开发者

How to simulate the collision of two sticks, like you see in Angry Birds?

The angry birds buildings seem to be composed of rigid sticks that collide and fall. I sure would like to know how to do that. I don't mind writing original code but surely someone has figured this out already and made it open source开发者_开发知识库?


You might want to have a look at Box2D. This is an excellent 2D rigid body dynamics library written by Erin Catto. Not only is it open source, there are also a number of very good GDC presentations, explaining the theory behind the code you'll find in the library.


As far as I know, AngryBirds uses the chipmunk physics library (but I might be wrong with that). Personally I have looked into Box2D and chipmunk as 2D physics libraries and I am more convinced by chipmunk. This is also because the language bindings to Python and other langueges. They just work out of the box. (no pun intended ;) )

Update: seems I have been wrong, AngryBirds is apparently using Box2D.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜