Chipmunk 6.0 Beta

Official forum for the Chipmunk2D Physics Library.
Post Reply
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Chipmunk 6.0 Beta

Post by slembcke »

Ok! So Chipmunk 6 is almost ready except that I haven't finished updating the documentation yet.

You can check out the source from subversion here:
http://chipmunk-physics.googlecode.com/ ... pmunk-6.x/

Now, keep in mind that this is a beta and that the documentation isn't complete yet. I'm posting this so that people can try it in their projects so I can get feedback. There might still be a few bugs here and there, so make sure you test things well before releasing a game built on it.

So what kind of feedback am I looking for?
  • The API has changed slightly in order to pave the way for new features. Some functions and fields have been replaced with new ones, while some have been removed or made explicitly private. I need to make a Chipmunk 5 -> 6 migration guide. So ask questions like "I was doing this: ... how do I do the same with Chipmunk 6?"
  • New feature X is cool. New feature Y as lame. New feature Z would be even cooler if you did W.
  • Crash reports.
So what has changed?
  • Chipmunk 6 supports several different broadphase algorithms. An AABB tree with good temporal coherence, 1D sort and sweep, and good old spatial hashing. Chipmunk now defaults to using the AABB tree when creating new spaces. This should increase performance for most games. It requires no tuning like the spatial hash does, and isn't nearly as sensitive to variable sized objects.
  • Accessors and iterators for many things that didn't have an official public API or simply weren't accessible. cpBodyEachArbiter(), cpBodyEachShape(), cpBodyEachConstraint(), cpSpaceEachBody(), cpSpaceEachShape(), etc.
  • Access to the collision graph using cpBodyEachArbiter(). One great use is to easily check if your player is standing on the ground, and which shapes it is touching.
  • Performance. A lot of things have changed that should notably improve performance.
  • Better support for variable time stepping. Cached impulses are now applied in a way that includes changes to the timestep. Fixed sized timesteps are still highly recommended to avoid problems with missed collisions, but Chipmunk will now work better with time scaling.
  • Vastly improved sleeping algorithm. (Though I suspect that nobody will notice)
  • Made a lot of Chipmunk's API explicitly private. While this will cause a number of grumbles if people were doing undocumented things, at least now they know for sure when they are doing it.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Buschmaster
Posts: 71
Joined: Sat Dec 20, 2008 12:16 pm
Location: Minnesota
Contact:

Re: Chipmunk 6.0 Beta

Post by Buschmaster »

Great! I'm looking forward to trying it out. Would you like an FPS test straight from 5.x to 6.0b?

It could be interesting to see. :)
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk 6.0 Beta

Post by slembcke »

Sure, that would be useful too. The AABB tree was faster with everything I threw at it except for the logo smash demo. It would be good to get some broader results as well.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
dieterweb
Posts: 176
Joined: Fri Feb 27, 2009 7:12 am
Location: Germany
Contact:

Re: Chipmunk 6.0 Beta

Post by dieterweb »

Awesome, I will try it as soon as we get ZombieSmash Campaign 2 out of the door...
Visit our game Blog: [url]http://zombiesmash.gamedrs.com[/url] or follow us on twitter: [url]http://twitter.com/zombiesmash[/url]
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Chipmunk 6.0 Beta

Post by aisman »

Trying to compile Chipmunk 6.0 with VisualStudio 2010.
There are lot of errors. @slembke has you test it ?
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk 6.0 Beta

Post by slembcke »

I complied it with the express version just a week or two ago to do some performance testing on my Atom netbook. I'll take a look again I guess.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Chipmunk 6.0 Beta

Post by aisman »

slembcke wrote:I complied it with the express version just a week or two ago to do some performance testing on my Atom netbook. I'll take a look again I guess.
Thanks. I am waiting ;-)
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Chipmunk 6.0 Beta

Post by slembcke »

Ok, so I swear that I had been fiddling with it under windows... but apparently that has never been done...

There were a couple issues, the most annoying of which MSVC seems to be unable to tell the difference between a (static) declaration and a definition. -_- That required some brain dead #ifdefs. Ugh. Have fun with your compiler. :p

On a sidenote, you really might consider using GCC or Clang to compile Chipmunk for release builds. Chipmunk compiled with GCC is about 10-15% faster in the benchmarks than compiled with MSVC on the same machine.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Chipmunk 6.0 Beta

Post by aisman »

slembcke wrote:Ok, so I swear that I had been fiddling with it under windows... but apparently that has never been done...

There were a couple issues, the most annoying of which MSVC seems to be unable to tell the difference between a (static) declaration and a definition. -_- That required some brain dead #ifdefs. Ugh. Have fun with your compiler. :p

On a sidenote, you really might consider using GCC or Clang to compile Chipmunk for release builds. Chipmunk compiled with GCC is about 10-15% faster in the benchmarks than compiled with MSVC on the same machine.
Sorry but I have to use Visual Studio 2010 for all of our projects.
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
aisman
Posts: 145
Joined: Tue Mar 04, 2008 2:21 am
Contact:

Re: Chipmunk 6.0 Beta

Post by aisman »

Ok. 733 works with VS2010. Thanks!
Trying the demo: I got an internal error on sensors example:
cpSpace.c:371
cpAssert(node, "Internal Error: Attempted to remove an arbiter from a body it was never attached to.");

I detect another error? on the bench demos:
C:\chipmunk-physics\branches\Chipmunk-6.x\msvc\vc10\demo\Release>demo -bench
Initializing Chipmunk v5.3.4 (Debug Enabled)
Compile with -DNDEBUG defined to disable debug mode and runtime assertion checks
Aborting due to Chipmunk error: Unsolvable constraint.
Failed condition: determinant != 0.0
Source:c:\chipmunk-physics\branches\chipmunk-6.x\include\chipmunk\constraints\util.h:105
Chipmunk4PB: The fastest way to write games together with PureBasic and the Chipmunk physics engine.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests