Pressure simulation for a game.

Started by
0 comments, last by CulDeVu 7 years, 4 months ago
So I've recently gotten Box2d to work with C++ and am having fun with it, but I wanted to add heat and pressure to my game.
Here's a decent example of the kind of pressure system I'm thinking of:
http://dan-ball.jp/en/javagame/dust/
That said, is there any page that summarizes the math required for this?
I've searched "air pressure simulation" and "wind simulation" and haven't really come up with much in the way of guides and tutorials.
Advertisement

Wind can be modeled pretty nicely by just regular old forces in Box2D, but that doesn't seem like what you're wanting. That little web game is really just a fluid simulation, with bells and whistles added on top of it. In those simulations, air, water, fire, and pretty much everything else that isn't rigid is described with by the equations of fluid dynamics. Pressure is part of the Navier-Stokes equations, the one that defines how fluids move, and advection is a natural extension of those equations as well.

A good tutorial, if you're into building cool simulations yourself, would be: https://software.intel.com/en-us/articles/fluid-simulation-for-video-games-part-1

If you're more into just using a physics engine, though, LiquidFun is just Box2D but with support for fluids: http://google.github.io/liquidfun/

Those links should at least give you a place to start, and some keywords to start Googling around.

I'm sorry about any spelling or grammar mistakes or any undue brevity, as I'm most likely typing on my phone

"Hell, there's more evidence that we are just living in a frequency wave that flows in harmonic balance creating the universe and all its existence." ~ GDchat

This topic is closed to new replies.

Advertisement