LiquidFun (original) (raw)
Overview
LiquidFun is a 2D rigid-body and fluid simulation C++ library for games based upon Box2D. It provides support for procedural animation of physical bodies to make objects move and interact in realistic ways.
Stable releases of LiquidFun are available for download fromgithub.com/google/liquidfun/releases.
LiquidFun source code is available for download fromgithub.com/google/liquidfun.
Discuss LiquidFun with other developers and users on themailing list. Report issues on theissues tracker or post your questions tostackoverflow.com tagged with "liquidfun".
Testbed
You can write LiquidFun code in C++, Java, or JavaScript. Here is our testbed program ported to JavaScript. It runs LiquidFun in your browser.
Documentation
- Readme: Overview of the project.
- Release Notes: Changes present in each release.
- Build Instructions: Use these after downloading the library's source. This document describes how to build the library, examples and unit test binaries from source for each target operating system.
- Programmer's Guide: An introduction to game physics, descriptions of LiquidFun's components and examples.
- API Reference: A full description of all LiquidFun C++ methods to be used in conjunction with theProgrammer's Guide.
- Java and SWIG: How to use LiquidFun from Java via the SWIG bindings.
- Inside LiquidFun: A presentation detailing the algorithms behind LiquidFun's particle simulation.
Trailer
Examples
The following videos show the Testbed application demonstrating LiquidFun's fluid simulation functionality. The videos are recordings of Android build of the Testbed application.
Dambreak
An initially rectangle shaped wall of water particles falling under gravity and crashing around a rectangular space.
Elastic Particles
Three groups of elastic particles interacting with a circular rigid body.
Particles
Water particles falling under gravity into a container with a circular rigid body displacing them.
Surface Tension
Three different colored groups of particles with surface tension demonstrating attraction and color mixing.
Wave Machine
Water sloshing around an oscillating container.