Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone physics engine for fluid/water simulation? [closed]

I'm about to start developing a game that's main feature revolves around 2D water simulation. I have thought about starting with Box2D and designing water in that engine, but I'm not sure if it would be efficient, and I don't have any experience with Box2D.

It would be great if there was an engine with good fluid simulation built in. If not, where should I start? I have been searching around for a while and still don't really have a good place to begin.

The water is only going to take up at most 10% of the screen at a time, and my goal is 40 FPS on the 3GS and 45+ on the iPhone 4. Just rough numbers.

like image 780
Gus Avatar asked Mar 10 '11 00:03

Gus


People also ask

How do fluid simulations work?

They work by simulating a large number of particles to approximate fluid molecules. The most popular Lagrangian methods are position-based dynamics and smoothed particle hydrodynamics. In position-based dynamics, particles have speed positions, and they interact with potentials that imitate fluid.

Is fluid simulation free?

Fluid Simulation Free is a fun and relaxing app that converts your smartphone into a liquid space where colors flow and respond to the touch of your finger on the screen. This is an app that uses the touch sensitivity of your screen to allow you to create a whole galaxy of animated and fluid colors.

What is water SIM?

This is a new version of liquid simulation sandbox, in which you can create water, oil and foam, add pipes and sewers, draw walls and air emitters. A new Grid function is added for drawing straight lines.


1 Answers

actually you have to trick to make something looking smooth. Disney's "Where is my water?" app, is awesome for this, they make a first render of large balls and then create a water mask which serve as a filter to make this appears like a real stream. This will visually be much better even if physically it is more approximative than simulating hundreds of thousands of drops.

Take a look on this example to see what I mean

I never pushed Box2D to its limits but in my opinion it should be adapted enough for this usage.

like image 99
Flavien Volken Avatar answered Oct 15 '22 12:10

Flavien Volken