Ah! I know what is going on...the SimCompression_pde.pas file is a partially converted version which I forgot to delete - it is not used, sorry about that!!
The files you need to look at are the units\unit_liquidsimulator.pas file, and of course the xeEngineTest.dpr file too
Continue I think works the same in both languages, at least my code gives the same visible results...what does cycle do? I haven't heard of that one
hmm...interesting, I just ran it on my machine here (Win XP, Intel(R) Core(TM) 2 Quad CPU (@2.83GHz, 3.48GB RAM) and it does't come close to hogging one core.
LOL The only game I remember playing with fluids is Terraria, and ok that does work only down and sideways as you said...but I quite like the way the 'pressure' pushes liquid up again as that is what I would expect to happen
It could easily be changed though
Ok, it could definitely be made more efficient. Perhaps I could use a particle (pixel) based approach that you mentioned earlier, but that would be harder to draw wouldn't it? With the current version, you just draw some tiles (which also fits in with how a game I am writing is done too)...
Other ideas would be to have a separate list of tiles with pressures in them which you process instead of the whole map, and only process their neighbours too in the map when needed...that should be much quicker.
Hmm...I could also convert the current version to use fixed-point math too, that might may things quicker too
cheers,
Paul
Bookmarks