Hi All,
I've been working hard to get this new version ready before i go on vacation, this version is much improved with a lot of new features.
So what was it all about?
Chipmunk is a physics library which is written in C, now most people who program for the iPhone have no clue of C which makes it strange and maybe even hard to work with. Now for Chipmunk there is a commercial licensed Objective-C wrapper available but it costs nearly $200, which i find a bit disappointing, it could be well worth the money but just not for me.
Besides that it doesn't have a nice integration with Sparrow, now i don't say that this version already has it but is has some.
So what did it already support?
Basic functionality, bodies, shapes and a manager to manage it all. Also the automatic updating of SPDisplayObjects that are attached to the bodies. It wasn't much but it was a nice start.
So what does it now support?
Constraints!, all the constraints that are available through Chipmunk are now also supported though the wrapper, this includes:
Damped rotary Spring
Damped Spring
Gear Joint
Groove Joint
Pin Joint
Pivot Joint
Ratchet Joint
Rotary Joint
Rotary Limit
Simple Motor
Slide Joint
What else is new?
The collision handler has had some improvements, now you can also register a global handler, and handlers which only respond to certain phases of a collision.
There is now also support for window bounding boxes, this means you can add a border around your screen preventing objects from floating away.
But does it work?
Well, now you can see for yourself, i have included demo's for all the different constraints, just run it in the simulator and step through all the demos. You can also use the mouse (touch) the influence the objects itself, but keep in mind, the mouse can be a bit icky sometimes, don't know why but it responds very heavy sometimes, so go slow with dragging.
Everything you see on the screen is literally what Chipmunk knows, this is called debug draw. If you want to add it to your own project you can add a SPDebugDraw component to your stage which will render everything from Chipmunk.
Where can i get it?
You can get it over here: http://www.sodeso.nl/Chipmunk.zip (mind the capital C )
GitHub source: https://github.com/sodesocompany/Chipmunk-Objective-C-Wrapper
GitHub download: https://github.com/sodesocompany/Chipmunk-Objective-C-Wrapper/archives/master
How to use it:
Look at the description on this posting for more information (also check out the video made by enbr):
http://forum.sparrow-framework.org/topic/sparrow-chipmunk-demo-project
video: http://cl.ly/0B2j0O3Q2n3N0t0A2g09
So what can we still expect?
More demo's, further integration with Sparrow (where applicable), more control over property changes of bodies and shapes. And the manager class needs to be revised a bit.
This will all have to wait a bit,i am going on a holiday the day after tomorrow so i will be back in about two weeks.