Guest Post: Teddy on Water Transitions

In game development, sometimes you encounter things that are so annoying to implement that you need to vent on someone else’s blog. This is one of those times.



Task: make a short transition between low water and high water, to be played when you close or open the dam in Tai Ming. Easy enough, right? Well, yes, but sometimes it’s the easy things that end up melting your mind!

Here are the assets involved (excluding the background) in creating the transition above:


The stuff in the pink square (top left) are overlays needed to preserve the illusion of depth. These had to be placed at heights intertwined with the stuff in the light blue square (bottom left), to make sure the right mass of water is behind and in front the right rock piece. Oh, and the rock pieces had to be cut out of the background with pixel perfect precision! The piece of grass was needed to hide the edge of the water on the left side.

In the dark blue section (top middle) are all the waterfall animations that Fred had to make! Each of them was a small puzzle of their own. The top four sprite sheets were pieces that can be used to create waterfalls of any height, needed for when the waterfall rises. This custom made waterfall must appear and disappear the correct way to fit with the “appear” and “disappear” animations. Note on the bottom spritesheet how the foam does not despawn until frame 5, meaning it must keep playing until then!

In the green square (middle bottom) you find Fred’s favorite pastime: animated water edges. These appear when the water has reached the top, hiding seams and creating some nice motion. Due to the uneven edges of the rock walls, however, these things don’t look proper at all while the water is moving! Something else was needed to hide the water’s edge during this period.

To this end, Fred made ten tiny particles, to be placed along the water’s edges! These are found in the red square (upper right). I had to be careful that these particles didn’t behave nonsensically, for example making sure that the water drops always flew away from the walls, to avoid water ripples on the vertical parts of the background.

After a few decades of fine tuning positions, timings, particle abundance and fading, we finally arrived at the point you see in the gif. I should’ve never quit law school!

Note: In reality, Teddy loves even the dreary parts of his job, and is quite happy he quit law school!
Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment