Use the arrow keys to guide the whale. Left-right and up-down work as expected. Press A and Z to swim towards the front or the back. Press K to shift between keyboard and mouse control mode. Press T to turn off the twisting behavior (it's fun but a little glitchy).
This is a blank template for building an animated whale. The scripts for the finished projects come from ivan321 and NickNouse. I didn't change much, beyond adding the animated underwater scene, which comes from http://www.dolphin-way.com/