Hi!
I'm developing my game and recently understood that Box2D is not enough for it.
Performance is good in general but I get lower (50-55/60) FPS when have a lot of physics objects using my HTC One. I want to make my game run good on most devices.
What about Chipmunk engine? I hear that it's way faster than Box2D. And I can see that non-pro version is free and open source. Is it hard for Gideros developers make one more physics engine for it? How about making plugin myself, is it possible?
Comments
2) Unfortunately currently we don't have time nor resources to add additional physics engine
3) Yes you can surely make your own plugin if you are familiar with that specific physics library and C++ and a little of Lua bindings (with latter I can help )
there are already bindings
https://code.google.com/p/lunatic-chipmunk/
Only need to change initiating to make it behave like Gideros,
let me try hopefully this weekend
Added dll file to post, simply put it in Plugins directory in Gideros installation folder
and here is my test code (which is NOT working as expected)
http://lua-users.org/wiki/BindingCodeToLua
Yeah, I saw that bindings but I think it's far from full. There just a few classes, no even joints.
So I can share source of that chipmunk plugin, if you need
Basically all I did was write stub file (chipmunk_stub.cpp) to make it a Gideros plugin, put it all into QT and changed some header paths and thats it, desktop plugin was ready
I used Chipmunk in the past, and I think it is just great, and I don't understand Box2D popularity, Chipmunk is clearly superior unless you want to do crazy joint physics.
Mostly because of how Chipmunk tracks objects (a spatial hash, while Box2D use a stupid tree that it has to reorganize too frequently).
You can see the difference of performance when you stick kazillions of similar objects in the same scene, for example trying to simulate a fluid with several thousand circles, chipmunk handles that well, Box2D does not.
On the other hand, if you want to simulate springs + ropes + crazy joints + crazy scales (ie: a 10 cm object tied to a 200 meter object tied to a spring to a 2km mountain) then Box2D behaves better.
But for the games I do (when I use physics, that is...) that are usually shmups or resemble shmups, Chipmunk is MUCH, MUCH better.
(I wrote the above post, and clicked "post comment" when this thread had zero posts... now I turned on the computer, saw this page, and saw that it finally finished submitting O.o)
Likes: SinisterSoft
It's working and I think quite fast. I compiled chipmunk for Android, took lua bindings and call it thought LuaJIT's FFI. It's not so easy-to-use as internal Box2D but it works good!
Anyway, I can't recreate that physics on chipmunk that I had on Box2D, so I will not use it. If someone wants to finish my job (ffi bindings need to be changed a little, very easy) you can tell me, may be we'll release a plugin.
Likes: ar2rsawseen
I have complex physics character with 60 bodies and 120 different joints.. After 4 hours of experiments I couldn't make same behavior as with Box2D. But for other things I think it would be great.