10
\$\begingroup\$

How would I go about implementing fluid dynamics in a game, such as can be seen in this video?

\$\endgroup\$
2
  • 6
    \$\begingroup\$ Have you tried googling "2d Fluid Simulation"? \$\endgroup\$ Commented Nov 12, 2011 at 0:55
  • \$\begingroup\$ A search term that may be useful to you is "smoothed particle hydrodynamics". Update: here is a very good introduction to the field. \$\endgroup\$
    – DaleyPaley
    Commented Apr 16, 2013 at 5:36

3 Answers 3

18
\$\begingroup\$

It looks like the game is just using a fairly simple particle fluid simulation. Basically, the "water" consists of little balls that move according to Newtonian mechanics, fall under gravity and repel each other over short distances. The blobs of water are then drawn around the particles using something like metaballs to smooth the surface.

\$\endgroup\$
1
  • \$\begingroup\$ Actually a good, clean answer to an otherwise overly-broad question \$\endgroup\$
    – bobobobo
    Commented Jan 28, 2012 at 14:57
4
\$\begingroup\$

Looks very similar to the water in PixelJunk shooter. There is a PDF on how the water was done:

http://www.maisonikkoku.com/yonder/SIGGRAPH2011/SlidesForADBAD.pdf ^^link has gone dead... you can get the cached version from google search, but if you're very very lazy, then you may view this copy if you need to: http://dl.dropbox.com/u/203979/SlidesForADBAD.pdf

\$\endgroup\$
1
  • \$\begingroup\$ The link goes to a dead-end. \$\endgroup\$ Commented Jan 29, 2012 at 14:56
0
\$\begingroup\$

Try to read great serious of articles from Intel about fluid simulation for video games http://software.intel.com/en-us/articles/fluid-simulation-for-video-games-part-1/

And also try this, fluid simulation in Alice game http://developer.nvidia.com/content/fluid-simulation-alice-madness-returns

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .