Water

Water plays an important visual role in Everend. There are plenty of really nice looking shaders already made, but to get the kind of look that cave water has we needed our own. We didn’t need anything too complicated so our water includes only the basics like distortion, waves made up of normal maps, and color change based on water depth.

Waves

EvNrm

To get the wave effect we simply used two normal maps scrolling in opposite directions. The immediate effect is an invisible plane, but with the addition of a specular reflection the waves start to show when a light is reflecting off of them.

Refraction

EvDist

The water surface at this point is still mostly invisible except for the specular reflection so we added a distortion effect to the water. The refraction part of the shader uses the same normals as the specular reflection. To get this effect we used Unity’s GrabPass to grab what would have been displayed and grab either a pixel offset to the current one based on the color of the normal map. The method to create the distortion is fairly straightforward. The shader needs to grab the red and green color of the normal texture which are between 0 and 1 and transform the values so they fall between -1 and 1. Then it needs to get the position of the current pixel and add the offset to it. Finally use that value as the location of a pixel on the GrabPass texture and return its color. As long as the normal map has smooth transitions so will the distortion. The intensity of the effect can be altered by multiplying the transformed red and green values, and if you pause the scrolling normals then the effect works well for ice.

Depth

EvFul

The last two effects are both based on camera depth. The surface of the water should remain clear, but as its depth increases the color should change and the water get murky. This effect can be achieved by getting the distance between the water plane and the pond bottom and linearly interpolating between clear and colored based on the difference. To get the distance to the surface of the water the shader should multiply the vertex position by the model view projection matrix, and then in the fragment function all you need to do is grab the positions z value. To get the Depth of the pond floor you just need the LinearEyeDepth of the camera depth texture. After that subtract the plane depth from the floor depth and you have the difference (You can divide this by a value that will then control how deep the color starts to change). Then linearly interpolate between your surface color and underwater color based on the difference and return the color.

Advertisements

The Gameplay

We are attempting to blend a 2D and 3D experience with Everend. What I mean by this is the game looks like a 2D side scroller and for the most part plays like one; however, the character has full 3D motion in the world. The game starts with the player lost deep in a cave. They will travel through several levels solving puzzles and avoiding obstacles on their journey to the surface. The puzzles are based around a core set of mechanics, namely, fire, water and flight. The player has the normal set of abilities like jumping, swimming and interacting with objects in the level.

Flight, or gliding in this case, plays an important role in many of the puzzles. Not only is it a fun way of getting around in the levels, it can also be used to reach far off ledges and in some cases players can get a boost of speed or height using an updraft.

Inkburd2Edit

Fire can be used to boost the players gliding, scare off other creatures and can, of course, be used to light your path. However, the player must use their torches sparingly as they only last a short while and can sometimes be difficult to find. Fire can also be used to burn through roots and dead plants to reveal secret paths or shortcuts.

cave02_night

Water and caves are a dangerous combination; in Everend its dark depths contain strange glowing fish and other, more dangerous, creatures. To progress in the level the player may have to swim long distances while avoiding falling prey to hidden eel’s that make the dark water ever more dangerous. Sometimes water may be too deep or too shallow and the player will have to drain or fill a room to progress.

Scale

The player will run into other creatures as well. Animals that are used to the dark cave will be frightened by fire. The player will run into moles that are not inherently dangerous, but will attack if you get too close. They can be frightened into a corner with a torch where they will dig their way through the wall if possible. The player will also have to deal with bats that will hinder the player’s ability to glide by continuously crashing into them. The bats can be frightened in a similar manner to the moles, though they may need a little more fire to fully disperse.

-Logan, Strix Game Studio