Sign in to follow this  
Syerjchep

Pressure simulation for a game.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this