chipmonkey - a lightweight 2d physics port

Monkey Archive Forums/Monkey Projects/chipmonkey - a lightweight 2d physics port

Xaron(Posted 2011) [#1]
Hi all,

I work at the port of the lightweight 2d physics engine chipmunk. It will be called chipmonkey and open source.

I hope to finish it within the next week. Keep fingers crossed! :)


Leo Santos(Posted 2011) [#2]
Happily waiting!
:-D

Leo.


Xaron(Posted 2011) [#3]
I've done about 50% so far... :) Completion comes closer!


Wagenheimer(Posted 2011) [#4]
I can't wait for it! :P


Supertino(Posted 2011) [#5]
good name =D


Virtech(Posted 2011) [#6]
Will it work on Android? :p


Xaron(Posted 2011) [#7]
Of course. It's native Monkey code so that's why it's a bunch of work but also the reason it will work on every platform Monkey can compile to. :)


MikeHart(Posted 2011) [#8]
Go go go! :-)


Skn3(Posted 2011) [#9]
good luck :)


Qcat(Posted 2011) [#10]
Amazing!! sounds fantastic


Xaron(Posted 2011) [#11]
Thanks guys! I think it will take another 2 weeks, don't know exactly. The main stopper at the moment is my vacation next week (only next week). *g* Stay tuned guys, I work 100% of my free time on this...


Canardian(Posted 2011) [#12]
All vacations have been cancelled, until Box2D is ready!
Unless you code 24/7 during vacation.


Xaron(Posted 2011) [#13]
Lol. Tell that my wife. :D


Supertino(Posted 2011) [#14]
ok we'll give you 2 weeks but if we find just one bug then we'll... eh... um... write hurtful things about you on this forum.


Xaron(Posted 2011) [#15]
Uh oh ok! Hehe

Luckily there are a lot of nice demos shipped with chipmunk which will be converted as well of course.


Virtech(Posted 2011) [#16]
I wish the physics warrior good luck on his journey ;)


MikeHart(Posted 2011) [#17]
Cant wait till it is done.


Chroma(Posted 2011) [#18]
Yep looking forward to this one. My game is on hold until your port is done because I was using chipmunk with BMax!


Indiepath(Posted 2011) [#19]
Any news yet?


Xaron(Posted 2011) [#20]
Yep. I'm back from vacation. ;) Ok, obviously not that kind of news you are interested in? I'll continue now. :)


slenkar(Posted 2011) [#21]
k lol


Xaron(Posted 2011) [#22]
Still work on that, doing the constraints right now. Might take another one or two weeks as I have a day job as well. ;)


muddy_shoes(Posted 2011) [#23]
I've been working separately on porting physaxe to Monkey, as I'm interested in using haXe/Monkey together. Physaxe is a physics library based on chipmunk. I've still got some work to do ironing out some bugs and performance issues, but I thought people might be interested in seeing what is running so far.

Warning: this is a HTML5 build and it makes my version of Firefox (4.0) quite unhappy when running the more complicated demos. Chrome seems to handle it fine. Also, I suspect that it will lock up on slow PCs as there seems to be a possibility for an infinite loop if the update takes too long.

Edit: I removed this version of the demo. See the dedicated Fling thread for the new link.


Xaron(Posted 2011) [#24]
That looks great! Never heard of physaxe but it looks much more easier to convert to Monkey.

I'm in the process of providing a first demo of chipmonkey soon, things are developing good! :)


Qcat(Posted 2011) [#25]
That is a fantastic demo!

I would not have expected a native physics engine in monkey so soon. it is running well in chrome but the computer I am using is an i7.


Xaron(Posted 2011) [#26]
Just want to let you know that I still work on that even though it takes longer than expected. Well I want to have it very clean... (and some stuff in the original is a pain in the ...)


Virtech(Posted 2011) [#27]
Waiting like crazy for your port.


Xaron(Posted 2011) [#28]
Uh thanks! Some motivating words! :D


Virtech(Posted 2011) [#29]
Will it be possible to set up multiple sources of gravity in chipmonkey? If not, does it simulate magnets?


Xaron(Posted 2011) [#30]
It will do everything chipmunk can do. :)

At the moment I work on a first demo which I can publish and a very rough first usable state of the engine.


Virtech(Posted 2011) [#31]
Ok thanks. Ill google it then :)


Xaron(Posted 2011) [#32]
This pointer stuff is driving me crazy. I wonder who likes this plain C style nowadays... Pointers, pointers to pointers... gna!


Virtech(Posted 2011) [#33]
Are we going to see a 1st release anytime soon?


Xaron(Posted 2011) [#34]
Sorry for the delay. It's a bit tricky, more than I thought it would as the author use some really dirty C stuff deep inside. Plus I have a full day job. But I still work on that and it takes some more time. I can't give a definite release date yet. How soon do you need it?


Virtech(Posted 2011) [#35]
No need for apologies. I realize that writing a port like yours must be alot of work. Because the lack of news recently, I just feared this project would turn into vapourware. Which I'm glad to hear it isnt. As long as you are working on it, and haven't lost interest, all is well :)
I don't really need it for any project in particular at the moment. Just want to start playing around with it and see if I can use it for a game idea I have.


Xaron(Posted 2011) [#36]
Ah ok. :) Thanks! No it won't be vaporware (even though it is at the moment) but Mark increased the pressure by posting it on his mods section. lol

In the meantime you could check out fling which is a port of haxe which is a chipmunk derivate. :D


Virtech(Posted 2011) [#37]
Yes Im aware of Fling. But found it to be a little bit to slow for my use (Android). Hoping chipmonkey will be faster.


Loofadawg(Posted 2011) [#38]
Really stoked at seeing this come to fruition. But please, do not rush.


muddy_shoes(Posted 2011) [#39]
>Yes Im aware of Fling. But found it to be a little bit to slow for my use (Android). Hoping chipmonkey will be faster.

While it's possible that chipmonkey will be faster, considering that it's based on the same algorithms and going through the same tool-chain your hope that chipmonkey will be a huge performance leap might be rather slim.

What would be useful would be to express what you mean by "too slow". What simulation were you running that seemed too slow? What platform were you running it on -- not just "Android", but what spec is the hardware? Have you performed any profiling?

The fact is that we're talking about something "X" using the library, written in a language that is translated to another language and then compiled and run on the Android OS on platform "Y". Performance issues could be anywhere in that chain.


Virtech(Posted 2011) [#40]
Wrong thread to discuss Fling. If I would have any interest in Fling I would have post in the appropriate thread. Not this one.


muddy_shoes(Posted 2011) [#41]
As I said, chipmonkey will likely share many of the characteristics of Fling because the underlying design comes from the same root. You are free to use or not use whichever library you feel like but if you want improvements in performance for whatever your application is then you need to give a little more information on the issues you are seeing. If there is a performance "bug" it is likely to be of common interest to chipmonkey or possibly even in the Android translation and of even broader interest.


Xaron(Posted 2011) [#42]
I agree. I don't think it there will be a huge performance gap to Fling.

Let's see. There is a lot of optimization potential especially for monkey as well...


Virtech(Posted 2011) [#43]
@muddy_shoes
Yes your right. I will provide more information about the performance issues I found on the Android platform. I will post this on the Fling thread.

@Xaron
Hows chipmonkey progress, any news you could share?


Xaron(Posted 2011) [#44]
Not yet. Things have slowed down a bit. This is really disturbing stuff, sorry. Fling should do it for the moment.