One By One Design

Multitouch Fluid Dynamics with AIR for Android and RTMFP

The other day I was having some fun playing around with Eugene Zatepyakin’s (aka @inspirit) FluidSolverHD (Actionscript port of C++ fluid dynamics library, MSAFluid. Or is MSAFluid, the processing/java port of the C++ library? In any case it’s a very cool fluid dynamics thingamabob – the HD version using Alchemy).

After a bit of tinkering, I began to wonder how well FluidSolver would run on an Android device using AIR for Android. I quickly discarded that idea though and thought maybe I could run the FluidSolver on the pc but control it from the Android device (turns out I was right in doing so. Just for kicks I later tried running FluidSolver on my Android phone. It starts off at a nice 20 frames per second or so then rapidly degrades to around 3 FPS. Then I shut it down before it just crashed my phone altogether).

So I dug into a bit of RTMFP – which is something I’ve been wanting to play with ever since checking out Jozef Chúťka’s (aka @jozefchutka) Remotair application. In fact, I could have built this thing using Remotair, but I wanted to get my hands dirty with a bit of code and learn myself something new. In any case, I do recommend the app – it’s very nice.

Anyway, an hour or two later, and I had the thing working and was actually quite surprised by the results. It runs much better than expected – multitouch enabled and all.

You can check out the final product in action in the video below…

[kml_flashembed publishmethod=”static” fversion=”10.0.0″ movie=”http://blog.onebyonedesign.com/wp-content/uploads/2011/01/demo.swf” width=”800″ height=”550″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

Posted by

Post a comment

Your email address will not be published. Required fields are marked *