Page 1 of 1

Chipmunk Physics Library

Posted: Thu Apr 19, 2007 6:28 am
by slembcke
Yet another 2D physics library utilizing the Box2D impulse solver!

I'll not waste too much breath here, there's plenty of info on the homepage: http://wiki.slembcke.net/main/published/Chipmunk

I've been working on this in my free time since September. The big features:
  • Poly, circle, and segment collision primitives, and multiple collision primitives can be attached to a rigid body.
  • Collision callbacks.
  • Spatial hashing for the broad phase collision detection step.
  • MIT license.
I've been releasing some early builds over on iDevGames.com with a decent amount of interest. There is even a game recently released as a public beta using my physics library. http://www.idevgames.com/forum/showthread.php?t=13866

I have an XCode project for OS X, and a quick and dirty shell script to compile for Linux.

I don't know if it will compile cleanly under MSVC though. I'd imagine that it would just need some header adjustment though. Is there anyone that could help me out on this front?

Lastly, impressions? Comments, criticisms?

Posted: Thu Apr 19, 2007 7:23 am
by Erin Catto
Good work! It seems like your simulation scales well by using a proper broad-phase. I posted a link to your engine on my site.

Coding in 2D is fun isn't it?

Posted: Thu Apr 19, 2007 1:12 pm
by raigan2
are those videos recorded in real-time? that looks pretty amazing!

Posted: Thu Apr 19, 2007 5:19 pm
by slembcke
raigan2 wrote:are those videos recorded in real-time? that looks pretty amazing!
No. I used a ton of iterations and extra substeps to make the stacks as stable as possible. The irony is that I used those videos for my senior seminar presentation on realtime rigid body physics.

The first movie with the small pyramid that falls over, almost runs in real time if I turn the settings down to something reasonable. It starts out a bit wobbly though. I have a similar demo in my demo application. You should check it out.

Posted: Tue May 29, 2007 9:01 pm
by pTymN
I have a 2D collision detection engine that performs fully swept collisions, modelling the swept movements as 4th order polynomials to find the root of. However, it absolutely cannot handle interpenetration. Does your physical solver resolve collisions in such a way that interpenetration is guaranteed not to ever occur?