[OLPC-Games] Physics with Python and Pygame (Chipmunk 2D Physics Engine)

Chris Hager chris at linuxuser.at
Sun Mar 9 22:35:35 EDT 2008


Hey all.

Recently I did some research on 2D (SDL) physic engines, and found that 
one of the most popular (called Chipmunk) with python bindings (pymunk) 
recently got an update. I had a look into it, and am totally amazed :) 
The chipmunk engine is easy, stable, fast, fun, open-source -- and now 
it's getting really possible to use it with python and especially pygame.

To support these efforts I've started writing a little API class (called 
pymunx), to make it even easyier to implement pymunk physics in pygame. 
Screenshots of the examples and a documentation I've put in the wiki:

  http://wiki.laptop.org/go/Pymunx
  http://wiki.laptop.org/go/Pymunx/Documentation

It supports x,y gravity, elasticity, mass, density, friction, inertia -- 
it is possible to draw polygons by hand, ... And it is real fun to try 
:) (especially demo6 and demo7). So, long talk little action... let's 
have a look now:

  svn checkout http://pymunk.googlecode.com/svn/trunk pymunk-read-only

This download includes:
  - precompiled chipmunk libs
  - pymunk bindings
  - pymunx api class
  - lot of demos

I think this physics implementation could be interesting for a variety 
of purposes. Games (of course), Screensavers, but also for Simulations 
and in educational and playful-learning meanings. I'm quite hooked on 
playing with demo6 and 7 (elasticity) -- and learned a lot about physics 
in the last days :)

Any feedback is welcome!

  Chris




More information about the Games mailing list