Hacer que PyBox2D funcione en todas las plataformas (Windows, Linux y Mac)

I'm trying to get my Box2D code running fine on all 3 plaforms. It's working fine on Windows for me, I simply installed Python 2.5, set my env path, and then downloaded PyBox2D from the following location: http://code.google.com/p/pybox2d/downloads/list

And installed. At that point, it just seems to work, at least based on my tests. One caveat however is that when I run the testbed app pygame_main.py it fails... But perhaps it was just not updated from a pybox2d change or something like that...

On Linux, how to do this is tricky, and more so on how to actually distribute a game... We've installed Python 2.5, and checked out the trunk of pybox2d from svn, built it and ran the setup. However when we actually try to make a world

File "box2dtest.py", line 28, in main world = box2d.b2World(worldAABB, gravity, doSleep)
TypeError: init() takes at most 3 arguments (4 given)

This is an error I got when I tried to build the game to Python 2.7 as well. I am not sure what to do from here to be honest.

I could toy with the idea of giving up on getting it to work on Linux if I could be sure it worked fine on Mac. I would love it to run perfectly on all systems :) Honestly, in my idealized world, the setup for the game would be simple. I'm just looking for people to help me figure out if I am running into a dead end, or if there is hope for getting this working. :)

Let me know what other information I can provide to help describe the problem. My partner set it up on linux so that is why my description is not too verbose on the linux side.

preguntado el 22 de mayo de 12 a las 20:05

1 Respuestas

It would have helped to have some more context for the code. On code line 28, you call b2World with to many parameters. The examples/hello.py in the distribution calls b2World() Me gusta esto:

b2World(gravity=(0,-10), doSleep=True)

so from the variables names you pass a parameter, I guess you have to leave out worldAABB.

respondido 28 mar '13, 05:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.