pymunk, a chipmunk python binding.

Share your projects and Chipmunk enhancements.

Re: pymunk, a chipmunk python binding.

Postby viblo » Sun Jul 26, 2009 8:37 am

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
viblo
 
Posts: 205
Joined: Tue Aug 21, 2007 3:12 pm

Re: pymunk, a chipmunk python binding.

Postby slembcke » Mon Jul 27, 2009 9:15 am

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: pymunk, a chipmunk python binding.

Postby viblo » Wed Jul 29, 2009 4:06 am

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: 205
Joined: Tue Aug 21, 2007 3:12 pm

Re: pymunk, a chipmunk python binding.

Postby viblo » Thu Jul 30, 2009 3:46 am

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: 205
Joined: Tue Aug 21, 2007 3:12 pm

Re: pymunk, a chipmunk python binding.

Postby viblo » Sun Mar 07, 2010 4:52 pm

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: 205
Joined: Tue Aug 21, 2007 3:12 pm

Re: pymunk, a chipmunk python binding.

Postby viblo » Sun May 01, 2011 11:10 am

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
viblo
 
Posts: 205
Joined: Tue Aug 21, 2007 3:12 pm

Re: pymunk, a chipmunk python binding.

Postby Nibo » Fri Sep 16, 2011 4:07 am

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.
Nibo
 
Posts: 6
Joined: Fri Sep 16, 2011 3:30 am

Re: pymunk, a chipmunk python binding.

Postby slembcke » Fri Sep 16, 2011 11:56 am

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/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: pymunk, a chipmunk python binding.

Postby Nibo » Sat Sep 17, 2011 12:49 am

Oh, it was simple indeed. Thank you very much!
Nibo
 
Posts: 6
Joined: Fri Sep 16, 2011 3:30 am

Re: pymunk, a chipmunk python binding.

Postby viblo » Tue Sep 20, 2011 9:21 am

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
viblo
 
Posts: 205
Joined: Tue Aug 21, 2007 3:12 pm

Previous

Return to Community Creations

Who is online

Users browsing this forum: No registered users and 1 guest

cron