2D tiled water physics

Monkey Archive Forums/Digital Discussion/2D tiled water physics

tiresius(Posted 2013) [#1]
Hey folks-

My googling has brought up nothing so I'm wondering, does anybody know of a website/document explaining the water settling algorithm used by games like Terraria, Dwarf Fortress, etc. ? I feel like there should be a standard best technique already determined. I'm interested in something similar and would like to explore the possibilities in Monkey. I might try to roll my own but I'd rather implement something proven in the field. Thanks for any help!


Ferdi(Posted 2013) [#2]
I was curious what water settling algo is, so I did a little digging in google/youtube, and I found across this:

http://www.youtube.com/watch?v=ZXPdI0WIvw0

There is a link to dropbox in that youtube video description. Unfortunately there are no explanation, but I think you can convert the code to monkey.

The other one I found was this:

http://vimeo.com/4391370

He uses SPH? His source code seems rather more complicated. Anyway interesting stuff. Hope it helps.

[Note] left click the link to dropbox, and not right click save as. If you right click save as it does not save the file but the dropbox page.


AdamRedwoods(Posted 2013) [#3]
top-down water:
http://freespace.virgin.net/hugo.elias/graphics/x_water.htm
http://beltoforion.de/java_applets/waves/wave_equation_de.html

wave equation as springs:
http://gamedev.tutsplus.com/tutorials/implementation/make-a-splash-with-2d-water-effects/

as particles:
http://gamedev.stackexchange.com/questions/26316/how-to-render-2d-particles-as-fluid/26369#26369
http://www.rowlhouse.co.uk/water/
http://en.wikipedia.org/wiki/Lennard-Jones_potential

as cell automata:
http://gamedev.stackexchange.com/questions/18355/ideas-for-2d-water-simulation?rq=1

...or verlet physics!
https://instruct1.cit.cornell.edu/courses/cs417-land/SECTIONS/dynamics.html
http://www.cocos2d-iphone.org/forum/topic/25494
http://www.blitzbasic.com/Community/posts.php?topic=84714


tiresius(Posted 2013) [#4]
Thanks total failure for searching. :( I'll take a look at these.