Faking water II

The water technique I described in the last post worked great, but it came with flaws. One such flaw was having explosions or other light sources under water didn’t look good. If the light source was in the darker area’s of the screen (outside the players light-area) you would see the normal “above world” lightning while being under the water level.  Hard to explain, but trust me, it looked bad.

I came up with another solution, and this one might be even more simple: a second tile set! I just copied the normal tile set, over-layed it with the blue underwater color, and that’s it. So for all tiles below the water-level, we simply draw from the second tile set where everything is blue.  I did the same thing to the players swimming animation frames, since those frames are only shown when the player is below the water level.

So now it looks like there is some awesome blue-light map covering the screen, but it’s just a bunch of blue graphics being drawn. No extra rendering required, so no slow downs, it also fixes the flaws of the previous technique, while looking just as good:

Notice the nice little fishy, these get randomly placed in the water area’s depending on the surround room they have to swim.

This new water tile set gave me the idea to possibly add another tile set for high-up in the temple. The top couple of rows in the tile map will use this new vegetation tile set based on a couple of rules:

1 – the top tiles (those that can be walked on) will be extra green
2 – the other tiles, those not at the top, will randomly get “branches” to not overcrowd the area with the same type of tiles. So these tiles are randomly set up to swap between the base tileset and the new grassy-tileset.

Finally we add some randomly placed bushes to get that old “tomb hidden in forrest” look:

This random world generator is getting pretty funky. One other idea I want to work out is adding branches in “roof” area’s so that you could climb along the roof of an area using the branches. This would not be just for looks, but making the navigation in the world even easier.

Bookmark the permalink.