NoisyOwl [he/him]

I make indie games.

  • 0 Posts
  • 3 Comments
Joined 1 year ago
cake
Cake day: September 18th, 2023

help-circle


  • Air is a compressible fluid, so ultimately you’ll need Navier-Stokes, but actually figuring out how to translate those equations into code is infamously annoying, so definitely check out an existing solution instead of trying to implement from the equations. Foster & Metaxas is an old a grid-based solution. Theirs is designed for incompressible fluids (water), but I think it should be fine if you raise β₀.

    There’s a lot of math in the paper, but it’s easier to implement than it looks (each step, run [2] on every cell once, then run [6] [7] [8] on every cell ~6 times), and it’s mostly just transcribing equations. It’s super fiddly though, just incredibly fiddly, expect to have to spend a lot of time debugging.

    There are probably suitable simpler solutions too though, so definitely spend some time searching for them (or just copyable implementations of Foster & Metaxas) before diving into that.