Hey,
just want everybody know that slembcke improved his chipmunk physics engine again. Its now around 10-20% faster!!
I tried it and it is just AWESOME!
- zombie
A fast, easy to use, free, and community supported 2D game engine
Hey,
just want everybody know that slembcke improved his chipmunk physics engine again. Its now around 10-20% faster!!
I tried it and it is just AWESOME!
- zombie
No need to update our code to get the speed increase? Just grab latest chipmunk?
yep, no api changes to the last version.
What chipmunk version are you currently using jd? I recent updated from the Chipmunk that's included with .8.2 to the latest Chipmunk. The only changes I had to make to my code were with regards to the collision callbacks. Chipmunk now has support for multiple collision callbacks at different stages of the collision, so setting up your collision callbacks, and the collision callback functions themselves have slightly changed. I wrote up a more detailed post about this in this thread: http://www.cocos2d-iphone.org/forum/topic/3996
Also, there's added support for a method to be able to remove shapes within your collision callbacks (sort of), you can read about it more on Chipmunk's site, but I found it useful as I was keeping an array of discarded shapes before that wold be processed in my game tick.
By the way, probably best to grab chipmunk from the latest cocos2d download rather than straight from the Chipmunk site as there's a couple changes made for compatibility with Cocos2d (mainly doubles to floats so that ccp and chipmunk's cpv are compatible).
- kalx
as far as I know there is only one change done in the cocos repository. It maps cpVect to CGRect. doubles and floats are now also handled in the chipmunk trunk. there is s special iphone target.
cocos2d ships with an unmodified Chipmunk 5.1. Only the demos were modified to work with cocos2d.
Since v5.1, Chipmunk uses CGPoint as cpVect.
You're right, it was just the one change :p Also, good to know the chipmunk trunk has an iphone target. Thanks.
- kalx
I just upgraded from his release 387 to 402.
I've got a demo app with 100 20px balls....
387 was averaging about 10 fps when all the balls where in one corner...
402 is averaging about 20 fps.
on a 3rd Gen Ipod.
According to the change log, he's ironing out a lot of memory stuff right now and lightening the load on the step.
So… Box2d vs Chipmunk. What should someone use?
Yeah, you'll have to grab the latest changes out of trunk at the moment. I haven't made a release with it yet as I just finished the changes yesterday. I think I got all the memory management straightened out so there aren't leaks.
Trunk doesn't make any API changes since 5.1, but it does have one API fix. separate() callbacks are now called before shapes are removed from the space to prevent dangling pointers. This means that you could end up having separate() called outside of cpSpaceStep().
@georgeburns You might want to take a look at the last few posts here
You must log in to post.