Results 1 to 10 of 39

Thread: Trouble porting liquid simulation to Pascal - AARRGGHH!

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Trouble porting liquid simulation to Pascal - AARRGGHH! (SOLVED)

    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
    Last edited by paul_nicholls; 30-08-2011 at 04:18 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •