2d physics engine?
I will probably be working in a 2d game with some physics. Is there a physics engine you could recommend? easy to install for people, and it is enough if it does 2d, I don't need more.(log in to comment)
Comments
I would go with either pyBox2d or pymunk (http://code.google.com/p/pymunk/) if I where you. ODE is harder to work with in 2d as you have to constraint the simulation to 2 dimensions and you also get a bit extra useless stuff in most calls because they assume a 3rd dimension.
As for pybox2d or pymunk, I would try them both this week and then decide (If I were you, if I were myself I would go directly with pymunk :)) You will probably find pymunk a bit easier to use from a python-perspective as its much more pythonic than pybox2d (which is very thin above box2d). You will also discover that pybox2d has a bit more features and the community of Box2d is a bit more active than the Chipmunk community. Another difference is that you only need a C-compiler and python to compile pymunk+chipmunk, while you also need swig for pybox2d+box2d.
Thanks for the advice... We finally went with "roll our own", probably with pure python to avoid adding dependencies. Hope we don't mess up the performance.
It is not smart, but I think it is more interesting
OK, it is mostly working. It should handle rigid convex bodies, with collision, rotations and... strings, of course :)
Collisions are already implemented but bouncing of as a response to collisions is the last thing missing. Now we will have to check how it performs when increasing the object count...
richard on 2008/09/07 02:44:
pymunk