Page 3 of 3

Re: pymunk, a chipmunk python binding.

Posted: Sun Jul 26, 2009 8:37 am
by viblo
viblo wrote:A new version, pymunk 0.8.2 has been released, see the first post in this thread and http://code.google.com/p/pymunk for details (this post is just to bump the thread to make the forum mark the thread for those who might be interested).
An even newer version, pymunk 0.8.3 has been released, see the first post in this thread and http://code.google.com/p/pymunk for details (this post is just to bump the thread to make the forum mark the thread for those who might be interested).

Re: pymunk, a chipmunk python binding.

Posted: Mon Jul 27, 2009 9:15 am
by slembcke
Thanks for your work on pymunk. It seems like quite a few people use it, and I'm sure it benefits the community.

Re: pymunk, a chipmunk python binding.

Posted: Wed Jul 29, 2009 4:06 am
by viblo
No problem, it wouldnt even exist without Chipmunk! :)

Re: pymunk, a chipmunk python binding.

Posted: Thu Jul 30, 2009 3:46 am
by viblo
Yesterday I uploaded a new version of pymunk, see the first post in this thread. The previous released one did not work on python 2.5 because of a stupid float infinity-problem (the worst thing is that I have had the same problem before, even if I it never reached a released version). Next time I will try to test it a little better before a new release!

Re: pymunk, a chipmunk python binding.

Posted: Sun Mar 07, 2010 4:52 pm
by viblo
Today I uploaded a new version of pymunk, this time version 1.0.0! See the first post in this thread for a bit more details.

Re: pymunk, a chipmunk python binding.

Posted: Sun May 01, 2011 11:10 am
by viblo
And now the time has come for another version of pymunk. I have updated it to the latest chipmunk from the version 6-branch, and it has most of the new features available for use. However, I still have some small things to work out with my current examples, seems like some of them have become less stable after the upgrade. I should also double check that I haven't missed some of the new interesting stuff in the binding :)

As its a rather big release it would be great if some pymunk users (if you are here :)) could try whats in SVN right now and see if it works. Also, any input on missing features or strange implementation choices would be nice.

As usual, code is available at google code: http://pymunk.googlecode.com/svn/trunk/
Or to get a copy directly, run:

Code: Select all

 svn checkout http://pymunk.googlecode.com/svn/trunk/ pymunk-read-only
Some new features compared to the previous version:
- Chipmunk 6 (latest revision from the 6.x branch retrieved today)
- More unittests, I now write a test for each new chipmunk function I wrap (and also try to add tests for old ones), which should help minimizing bugs and make sure everything works.
- Sleeping bodies
- Less dependencies (setup.py/distutils)
- It's tested in python 3.2 and all tests passed
- Tested in pypy 1.5. However, seems like pypy ctypes still has some problems which makes it fail on some tests.
- Lots of small changes

Re: pymunk, a chipmunk python binding.

Posted: Fri Sep 16, 2011 4:07 am
by Nibo
Thank you for pymunk. I`m novice in Python and programming. Right now I`m trying to create simple physics sandbox with Python2.6 pymunk v2 and nodebox(opengl). Can I ask a question here?

Everything seems to work fine, except few pymunk commands give me an error "'module' object has no attribute ...". I can not find anywhere why this might happen. The commands are:
Body.slew
Space.resize_static_hash()
Space.resize_active_hash()

Code and error looks like this:

Code: Select all

import pymunk
from pymunk import Vec2d

space = pymunk.Space()
space.gravity = (0.0, -900.0)
space.resize_static_hash()
space.resize_active_hash()

Loading chipmunk for Windows (32bit) [C:\Python26\lib\site-packages\pymunk\chipm
unk.dll]
Initializing cpSpace - Chipmunk v6.0.1 (Debug Enabled)
Compile with -DNDEBUG defined to disable debug mode and runtime assertion checks

Traceback (most recent call last):
  File "D:\Pythonmy\node2.py", line 167, in <module>
    space.resize_static_hash()
  File "C:\Python26\lib\site-packages\pymunk\__init__.py", line 371, in resize_s
tatic_hash
    cp.cpSpaceResizeStaticHash(self._space, dim, count)
AttributeError: 'module' object has no attribute 'cpSpaceResizeStaticHash'
or in case of "Body.slew":

Code: Select all

  File "D:\Pythonmy\node2.py", line 27, in __init__
    self.body.slew((500,500), 1)
  File "C:\Python26\lib\site-packages\pymunk\__init__.py", line 934, in slew
    cp.cpBodySlew(self._body, pos, dt)
AttributeError: 'module' object has no attribute 'cpBodySlew'
I`m sorry if this is something easy, but I spent 2 days on it already and can not understand why this is happening.

Re: pymunk, a chipmunk python binding.

Posted: Fri Sep 16, 2011 11:56 am
by slembcke
If it's based on Chipmunk 6, cpBodySlew() was removed completely as duplicating it's functionality was two lines of code and it forced people to understand what it actually did.

cpSpaceResizeStaticHash() and cpSpaceResizeActiveHash() are also gone because they are no longer needed to tune the physics simulation. Take them out of your code and forget about them.

Re: pymunk, a chipmunk python binding.

Posted: Sat Sep 17, 2011 12:49 am
by Nibo
Oh, it was simple indeed. Thank you very much!

Re: pymunk, a chipmunk python binding.

Posted: Tue Sep 20, 2011 9:21 am
by viblo
Thanks for noticing. I have now removed them from trunk version of pymunk.