PyODE 2d physics demo.

We have some nice 2d physics working now, thanks to PyODE. Still a long way from being a game though.

Demo code, tap the arrow keys. Needs PyODE.

(log in to comment)


hi, tried the demo on ubuntu linux. i have python 2.4 and the pyode, that comes with ubuntu installed. but sadly it crashes with
simon@silentia:~/Desktop/Pyweek other entries/balloon-demo-1.0$ python
Traceback (most recent call last):
  File "", line 13, in ?
  File "/home/simon/Desktop/Pyweek other entries/balloon-demo-1.0/lib/", line 71, in main
    ball = Balloon(world,space, object_list, pos=(.5,3))
  File "/home/simon/Desktop/Pyweek other entries/balloon-demo-1.0/lib/", line 19, in __init__
    ODEObject.__init__(self,world,space,list,ode.GeomSphere(space, radius), mass, pos=pos,image='ball')
  File "/home/simon/Desktop/Pyweek other entries/balloon-demo-1.0/lib/", line 33, in __init__
    self.join2d = ode.Plane2DJoint(world)
AttributeError: 'module' object has no attribute 'Plane2DJoint'

You need a newer version of ODE PyODE for the Plane2DJoint - 0.7 I believe.
I see - could you package that with the game? I really don't want to install it. I think including as much as possible will make your rating go up :-)

Yeah I was thinking of working with pyODE and was wondering if there was an easy way to package it up, or to use it as a simple module.

Does anyone have any experience with this or any helpful links?

For the final release we will do py2exe and py2app versions. I'm not sure about building linux binaries though, we've never done it before.
For linux support, I have a zc.buildout configuration that builds ode and pyode more or less automatically (and installs them locally, so the system setup remains intact). I will post about it at some stage.
erik: you can use cx_freeze to make a linux exe, I've had success with this in the past. It will package up pygame, I'm not sure about pyode, but it's work a shot.