kne / pybox2d-from-googlecode

Automatically exported from code.google.com/p/pybox2d
Other
0 stars 0 forks source link

pybox2d 2.1 OS X issues #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hi, i've tried compiling the alpha version you uploaded under osx. however i 
seem to be missing some files that are required to compile it (or i am 
understanding something wrong). as i'd like to do some tests with the 2.1.x 
version of box2d it would be awesome if you could update the repository.

thanks

Original issue reported on code.google.com by reto.spo...@gmail.com on 11 Oct 2010 at 10:06

GoogleCodeExporter commented 9 years ago
Hi,

The alpha version posted on the site was really just meant to cover one of the 
most common platforms so a few people could try it out without needing to 
compile (that being Python 2.6 under win32).

To compile for any other platform, you'll need to grab the latest svn version 
from

svn checkout http://pybox2d.googlecode.com/svn/branches/box2d_2.1/ pybox2d-alpha

and follow the building steps in the wiki.

An OS X tester isn't easy to find, so I'd be very grateful if you could give it 
a shot.

Thanks.

Original comment by sir...@gmail.com on 11 Oct 2010 at 11:51

GoogleCodeExporter commented 9 years ago
i've checked out the sourcecode and apart from a very curious swig problem:

line 18952 in the generated Box2D_wrap.cpp:
  SWIG_Python_SetConstant(d, "b2_maxRotationSquared",SWIG_From_double(static_cast< double >(((14159265359 5*3. 0.) *(0.5*3.14159265359)))));

should probably be:
  SWIG_Python_SetConstant(d, "b2_maxRotationSquared",SWIG_From_double(static_cast< double >(((0.5*3.14159265359) *(0.5*3.14159265359)))));

a ugly but working fix is to define b2_maxRotationSquared directly in 
b2Settings.h
(swig seems to have problems in this case to use a previously defined constant)
#define b2_maxRotationSquared       2.4674f

compilation worked fine up to this point, but i'm struggling with pygame right 
now. i'll post further updates if any problems occur after this point.

thanks

Original comment by reto.spo...@gmail.com on 11 Oct 2010 at 1:01

GoogleCodeExporter commented 9 years ago
Thanks for the update. That error is rather strange.
Which version of SWIG are you running?

Original comment by sir...@gmail.com on 11 Oct 2010 at 5:16

GoogleCodeExporter commented 9 years ago
it's version 1.3.36

Original comment by reto.spo...@gmail.com on 11 Oct 2010 at 6:08

GoogleCodeExporter commented 9 years ago
btw. the demo's seem to run fine, but sometimes run a bit slow. may be because 
of system updates that have been running at the same time

Original comment by reto.spo...@gmail.com on 11 Oct 2010 at 6:09

GoogleCodeExporter commented 9 years ago
Good to hear that they're running. 

The speed could depend on a lot of things -- your system specs, video drivers 
(unaccelerated "hackintosh" drivers are pretty bad, or so I've heard), to the 
amount of bodies/joints/etc in the world, to the backend you're using (pygame 
might be the fastest, pyglet second, pyqt4 third). You might also see a 
significant boost hitting f1 to turn off the menu drawing.

Original comment by sir...@gmail.com on 11 Oct 2010 at 8:57