Page 1 of 1
Anybody have experience with Chipmunk Physics?
Posted: Sat Feb 26, 2011 9:32 pm
by epicasian
If so, could you point me in the direction of a tutorial with the basics of it?
Re: Anybody have experience with Chipmunk Physics?
Posted: Sun Feb 27, 2011 3:46 pm
by avansc
Just gave it a quick overview, its rather impressive.
I see what you mean, the documentation is a bit lacking. if you checkout the svn and build that, a simple cmake . && make && sudo make install will do, it comes with a bunch of examples that will pretty much show you how do whatever.
Re: Anybody have experience with Chipmunk Physics?
Posted: Sun Feb 27, 2011 9:40 pm
by JS Lemming
*wipes dirt off brow*
I chose Chipmunk over Box2D for my latest "project". It's more straight forward in my opinion. I also think the simulation is less floaty than Box2D's. I checked out the demos to get the basics.
*goes back underground*
Re: Anybody have experience with Chipmunk Physics?
Posted: Mon Feb 28, 2011 6:16 am
by lotios611
The official docs are
here.
Re: Anybody have experience with Chipmunk Physics?
Posted: Mon Feb 28, 2011 7:10 am
by slembcke@gmail.com
Sorry about that. I suppose I really need to get around to making a simple end to end demo at some point.
A few hours before leaving for GDC is probably not the time to do it though. :-\
The big things that maybe aren't super obvious from just looking at the demos:
- Most Chipmunk structs have a void *data field that you can use as a pointer to the game object that owns the physics object. Use this to reference your game data from within Chipmunk callbacks.
- You can trivially build a transformation matrix from a cpBody pointer (example). I usually do that at render time. A lot of people do a copy phase, iterating over the rigid bodies or shapes in the space and copying the position/angle to their sprite data structures. I don't really recommend this as the performance doesn't scale well and it assumes a 1:1 relation between sprites and bodies or shapes.
Is this for a Dreamcast project out of curiosity? I'm not sure if Chipmunk has ever been used on the Dreamcast. I've always wanted to try my hand at homebrew like that.
Re: Anybody have experience with Chipmunk Physics?
Posted: Mon Feb 28, 2011 7:42 pm
by epicasian
Well, I suppose the only way to learn is the demos. I just hope I have some time soon with school and crap like that.
slembcke@gmail.com wrote:
Is this for a Dreamcast project out of curiosity? I'm not sure if Chipmunk has ever been used on the Dreamcast. I've always wanted to try my hand at homebrew like that.
I'm eventually going to port my project to the Dreamcast. I just hope when I build the static lib, it's painless because I'm not too good with compiler errors
.
And if you do plan about doing some homebrew, I highly recommend developing for the Dreamcast. The native libraries are very straight forward and easy to learn.