Hey all,
I found this article the other day:
http://w-shadow.com/blog/2009/09/01/...id-simulation/
and I just HAD to make a Pascal version of the code...I am hoping to get something like this added to The Probe game
Unfortunately I have been pulling out my remaining hair trying to get it working, and I am not succeeding!!
In my code, I have changed all references of Mass to Water, and my coordinate system uses -y for going up, and +y for going down which is the opposite of the source code posted on the site.
I have also used sx,sy for the source water tile (instead of x,y), and dx,dy for the tile the water is trying to move to instead of x,y+1, and similar.
It works sort of, but definitely is not correct - some water doesn't even fall down, and other anomalies...
I have attached a .zip file containing my project if anyone has time to try it out, and get it working correctly. It is driving me nuts!!
xeEngine - liquid sim.zip
It has both Lazarus and Delphi 2010 projects if this helps, and includes the engine DLL and a pre-compiled exe
Any help would be much appreciated!!
cheers,
Paul
Bookmarks