Spellcaster Studios

Make it happen…

Lake flow

Today I managed to make the flow of water work on the lakes… in the process I also found some bugs with the terrain generation code that I had to fix…

First, without any change to the flow system, this is what I got:

screen481

It was a quite neat effect, to be honest… but the rest of the water was just too static, which looked weird…

Then I added code to make the flow map on the rivers flow towards the nearest exit… but it wasn’t working properly, so I had to run this in debug, and since debug mode is so slow (mostly because of the pathfinding algorithm I use to create the rivers), I reduced the number of rivers to one, and that made a bug appear, but it looked cool!

screen482

Quite interesting, but completely unplayable… Smile

Anyway, I fixed that bug and the one with the lake flow and this is the final result:

screen483

The water clearly goes to the exit… It still has some circumstances in which it doesn’t work too well, for example when the exit doesn’t have LOS to the place I’m computing the flow… This could be solved with pathfinding, but I think it’s overkill for something merely cosmetic…

So rivers and lakes are almost done… Still need to port the shader to HLSL, add a waterfall effect and make sure that trees don’t spawn near the water on jungle levels…

Now listening to “Antichrist” by “Akercocke”

Comments

Comment