LiquidFun V1.1 Runs In A Browser
Written by David Conrad   
Thursday, 28 August 2014

We reported on Google's LiquidFun V1 earlier in the year as, as much fun as you can have without actual liquids getting involved. Now we have LiquidFun V1.1 and you can have as much fun in a browser.

liquidfunlogo

 

LiquidFun is based on Box2D but with fluid and soft body simulation. It is written in C++ and makes use of OpenGL. Now with version 1.1 it has been compiled to JavaScript and it runs on WebGL in the browser. This means everyone can join in as long as their browser supports WebGL. The compile was performed with the ever amazing Emscripten and to show that it works and works fast enough to be taken seriously the testbed application has been ported and you can view it in your browser. The API to make use of it is the same in C++ or JavaScript. 

In case you aren't sure what a particle simulation is all you need to know is that you define the position and properties of a set of point particles and the program will animate them for you. If you don't apply constraints to keep the particles positioned relative to each other you get a fluid:

 

 

If you apply some constraints then the particles "flow" as solid elastic blobs and you have soft 2D objects:

 

If the two videos have piqued your interest then visit  LiquidFun and try the realtime demos out in your browser. Also try the games to see the sorts of things that you might use LiquidFun for. 

 

Also new is official support for iOS for the testbed and the EyeCandy app. The particle simulation has alsow been optimised and it can now make use of ARM NEON SIMD hardware if the device has it - A8 up. There are also lots of bug and stability fixes and new functions. 

There is also the provision of two open source games to show you have it is done - currently only available from the US Play store. VoltAir is a C++ platform game.

liquidfungame1

 

The second game is LiquidFun Paint which is written in Java to show you how to use the SWIG bindings. Given that SWIG is a development tool to allow a range of languages to work with C/C++ the chances are that the same techniques could be used for PHP, Perl or Python to name just the languages starting with P.

 

liquidfungame2

 

Since it was released LiquidFun has been use by a number of commercial games and built into examples of particle simulation.

Now that it is available as a JavaScript library and works in any browser the chances are that it is going to be even more popular. Given that the three big browsers - Firefox, Chrome and Safari all support WebGL now is the time to create a killer web app that involves people or things getting wet - or just bouncing around. 

As I said about versions 1 if seeing LiquidFun in action doesn't inspire you to write something I don't know what is going to get you moving. With advances like this there is a lot of mileage in 2D games even post-flappy bird.  

Banner


AI Propels Python To Top Language on GitHub
30/10/2024

This year's Octoverse Report reveals how AI is expanding on GitHub and that Python has now overtaken JavaScript as the most popular language on GitHub. The use of Jupyter Notebooks has also surged.



Edera Releases Open Source Container Benchmark And Scanner
07/11/2024

Edera has released Am I Isolated, an open source container security benchmark that probes users runtime environments and tests for container isolation.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Thursday, 28 August 2014 )