pymunk is a wrapper around the 2d physics library Chipmunk, http://wiki.slembcke.net/main/published/Chipmunk
pymunk vision
Make 2d physics easy to include in your game :)
It is (or striving to be):
- Easy to use It should be easy to use, no complicated stuff should be needed to add physics to your game/program.
- "Pythonic" It should not be visible that a c-library (chipmunk) is in the bottom, it should feel like a python library (no strange naming, OO, no memory handling and more)
- Simple to build & install You shouldnt need to have a zillion of libraries installed to make it install, or do a lot of command line trixs.
- Multiplatform Should work on both windows, nix and OSX.
- Non-intrusive It should not put restrictions on how you structure your progam and not force you to use a special game loop, it should be possible to use with other libraries like pygame and pyglet.
I hope and believe that with the latest release (0.8.2) these points are at least partly fulfilled and visible if you use pymunk.
pymunk 0.8.2
pumunk users, rejoice! 0.8.2 has been released!
Changes from the last release:
- All issues in the issue tracker fixed
- Fixed chipmunk compilation on 64 bit Linux.
- API documentation improvements
- Various fixes and code cleanups
Elasticity set to 10 by default, if you want to gain a little performance (but loose bouncing balls and similar effects) reset it to 0.
As before, the windows installer should work on both python 2.5 and python 2.6
pymunk 0.8.1
A new improved version of pymunk has been released, woha!
Changes from the last release:
- Updated chipmunk to the newly released 4.1.0 version
- API documentation improvements
- Bug fixes and cleanup
- Fixes for all the issues reported to this page (until today)
note You should be able to use the windows installer on both python 2.5 and 2.6.
note 2 Do you have problem with bounciness in this release? Check out the FAQ for a solution!
pymunk 0.8
A new improved version of pymunk has been released, grab it while its hot! :)
note This release contain a number of bugs, one which will prevent pymunk from loading on some linux-installations. It has been fixed in svn, and a new release of pymunk will happen later this month.
The source release also includes the chipmunk binary for Windows and Linux, but you can almost as easy compile it yourself with python setup.py build_chipmunk
New features in this release
- improved setup script (should work to build on osx now)
- automatic Vec2d conversion (you don't have to send Vec2ds to pymunk functions)
- small improvements here and there
- cleanup of some examples
If you are on Archlinux, you can use the pymunk package found here: http://aur.archlinux.org/packages.php?ID=18518 (Thank you Fabio)
Documentation
See http://pymunk.googlecode.com/svn/tags/pymunk-0.8.2/docs/api/index.html for the API documentation of pymunk 0.8.2.
A snapshot of the latest svn version of the docs is located here: http://pymunk.googlecode.com/svn/trunk/docs/api/index.html
Support
Forum
Currently pymunk has no separate forum, but you can use the general Chipmunk forum at http://www.slembcke.net/forums/index.php Many issues are the same, like how to create a rag doll. If you have a pymunk specific question you can mark your post with [pymunk]
IRC
Pymunk has a irc channel, #pymunk at irc.freenode.org
You can mail me: vbxviblo.se (replace x with @)
Tutorial
(Not very updated, see the scripts in /examples) There is a new tutorial in the wiki area. It will walk you throu the slide and pinjoint demo included in the release. Go here to read it: SlideAndPinJointsExample
Screenshots from the included demos
From the contact demo, which paints red balls with big radius for big collisions, and small radius for small ones.
From the balls and lines demo. Static lines drawn by the mouse, balls added by mouseclick and growing balls when hoovering above them.
Displays a L shape with two joints, one pin joint in red and one slide joint in green. After a while the L will tip over and release the balls.