Sign up ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Anyone have any good examples, tutorials, or snippets to share that preferably in C# or C/C++?

share|improve this question

4 Answers 4

up vote 8 down vote accepted

PixelJunk shooter from Q-Games has nice set of fluids. There is a GDC paper they have published here: (PDF!)

Jos Stam from Alias Maya fame (now Autodesk) wrote paper on real time fluids in games here: (PDF!)

And he wrote a simple FFT fluid solver here: (PDF!) where he included source in that PDF at the end.

share|improve this answer

alt text

  • Practical Fluid Mechanics
    • Very detailed explanation with C++ code and pre-compiled binary. You can interact with the demo, like creating new smoke and stirring the smoke with your mouse. The image is a capture of the demo. Lists several on-line references at the end, as well.
  • Stable Fluids [PDF]
    • I think the author, Jos Stam, is the expert when it comes to fluid dynamics. 75 page summary of his research.
  • Chapter 38. Fast Fluid Dynamics Simulation on the GPU
    • More technical and math-heavy then the Cowboy Programming Practical Fluid Mechanics. Also lists several off-line resources at the end.
  • A Fire and Smoke Simulation for Mobile Game [PDF]
    • The weakest resource of the bunch, but I still found it worth bookmarking...
share|improve this answer

Here's a fairly primitive write up about using cellular automata for simulating fluids:

In certain situations such a simple approach can be appropriate (Dwarf Fortress uses a similar approach to simulate liquid flow; also - the powder game). Also, this approach is pretty easy to grasp/get up and running fast.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.