pymunk, a chipmunk python binding.

Share your projects and Chipmunk enhancements.
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post 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).
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post by viblo »

No problem, it wouldnt even exist without Chipmunk! :)
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post 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!
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post 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.
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post 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
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
Nibo
Posts: 6
Joined: Fri Sep 16, 2011 3:30 am
Contact:

Re: pymunk, a chipmunk python binding.

Post 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.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Nibo
Posts: 6
Joined: Fri Sep 16, 2011 3:30 am
Contact:

Re: pymunk, a chipmunk python binding.

Post by Nibo »

Oh, it was simple indeed. Thank you very much!
viblo
Posts: 206
Joined: Tue Aug 21, 2007 3:12 pm
Contact:

Re: pymunk, a chipmunk python binding.

Post by viblo »

Thanks for noticing. I have now removed them from trunk version of pymunk.
http://www.pymunk.org - A python library built on top of Chipmunk to let you easily get cool 2d physics in your python game/app
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests