opensource.google.com

Menu

Flowing into your games: LiquidFun 1.1

Thursday, July 17, 2014

We are thrilled to announce the 1.1 release of LiquidFun, an open-source 2D physics engine. It adds particle simulation to Erin Catto’s popular Box2D engine, and can be used as a drop-in replacement for Box2D. If your program is written in C++, Java, or JavaScript, you can easily use LiquidFun.

Today’s release adds some exciting new features to LiquidFun. Some highlights:

  • LiquidFun now runs in your browser! Using Emscripten, we’ve translated LiquidFun into JavaScript. You can see LiquidFun’s Testbed application, rewritten in JavaScript, running on our landing page.
  • We’ve added iOS support for LiquidFun’s internal Testbed and EyeCandy applications. Earlier versions of LiquidFun could be made to run on iOS, but iOS is now officially supported.
  • We’ve optimized LiquidFun's particle simulation. In particular, we’ve written NEON (a.k.a., Advanced SIMD) code to improve performance on ARM processors.
  • We’ve stabilized the simulation, fixed bugs, and added some cool new functions, including one that automatically splits a particle group into multiple, disjoint particle groups. 
  • We’ve clarified and improved the documentation, thanks to questions from the LiquidFun community.

LiquidFun Games

The 1.1 release also includes two physics-based, open-source games from Google, currently available in the US Play Store.

VoltAir, written in C++, is a fast platformer based on a compelling physics system, plenty of speed and motion, and interesting puzzles. If you’re a native developer, VoltAir’s source code is a great example of how to use LiquidFun.














The second game, LiquidFun Paint, lets you create art that moves, shakes, and delights. It is written in Java, and uses LiquidFun via SWIG bindings. If you’re a Java programmer, you may want to peruse the source code of LiquidFun Paint.



Several other games also have incorporated LiquidFun since its initial 0.9 release last December. One such game is the beautiful Battle of the SeaSons, written by three students from the technology university ETH Zurich.


Adoption

Our March 2014 release of LiquidFun 1.0 has already been integrated into several game development toolkits.
  • LiquidFun is also now a built-in component of the Lobster game programming language. 

Inside LiquidFun

If you’d like to learn even more about how the LiquidFun particle simulation works, you may enjoy our new presentation describing the tech and algorithms, Inside LiquidFun.

By Jason Sanmiya, Fun Propulsion Labs at Google*

*Fun Propulsion Labs is a team within Google that's dedicated to advancing gaming on Android and other platforms.

.