8
« on: December 11, 2009, 11:44:28 pm »
Hello,
I'm in the midst of developing a (vaguely) Roguelike game and, mostly just for kicks, decided that it would be nice to implement water into the game which would hopefully behave roughly like the water in DF. I am, however, extremely terrible at figuring out even remotely efficient algorithms for things like this, so this is where you folks come in.
As my game is entirely 2D, can someone knowledgeable about this subject explain approximately how the water in DF works, or might work, when ignoring any Z-level-related complications? I.e., if in one frame I have a bunch of variously-leveled water lying around on a flat surface, what's the basic algorithm that should be applied to it between that frame and the next in order to create reasonably DF-like flow of the water?
I'm sure that the answer will be extremely simple and obvious, but, as I said, I freely admit that this isn't my forte. Nonetheless, I'd really like to get something working so that I can mess around with it. Any help would be greatly appreciated. =)