Fish Simulator

Intent

I intended to create a control system for a fish using the mouse that is intuitive, unconventional, and mimics the movement of a fish in order to give the feeling of moving like a fish.

Features

  • Three-dimensional movement system
  • Complete control using single hand
  • Physical control system mimicking fish movement
  • Procedurally animated fish

Tools

System Synopsis

In this control system the player uses the mouse to control a fish. By moving the mouse left and right they control its tail and push the fish forward. Pushing the mouse far to the left or right causes the fish to turn in that direction. Moving the mouse up and down controls the fish's pitch. Pressing the left and right mouse buttons extend the left and right pectoral fins creating drag and turning the fish or slowing it down. .

Visual Design Document

Process

When starting on this project I was deeply inspired by the Skate series. The control system in those games mimics the actual movements of a skateboard and so is innovative and intuitive. I tried to think of another aspect of life that isn't represented well through controls in games and settled on fish. When fish are controlled in games they usually rely on a standard first person control scheme which does not accurately represent their unique form of movement.

In order to better understand how fish actually move I researched the physiology and physics of how fish swim. The subject is incredibly complex but informed me about the different types of fish movement and physically how a fish is able to move.

While I couldn't simulate how a fish moves due to its complexity I did begin to come up with a basic control system for the main part of a fish's locomotion, the tail. I settled on a system which uses the player's mouse to move the tail side to side in order to drive the fish forward and turn the fish. I decided on a mouse rather than a controller because a mouse has a wider range of motion than an analog stick.

When thinking about the motions I wanted the player to create I thought about the strength and smoothness that most fish exhibit while swimming. I knew that I needed to create a system which encouraged a smooth motion rather wild flailing to make the fish go fast and so wrote the code below to calculate the force provided by the fish's tail.

The script considers both the distance the fish's tail has traveled during the last frame (Line 75-81) and the angle that the tail was at (Line 85). This allows the player to move the mouse quickly to go faster while not providing much forward force unless the tail is pulled all the way out to the side.

Unfortunately using the tail to turn either made the fish turn very slowly or made the fish wobble back and forth uncontrollably. In order to remedy this I made the tail turn the fish slowly and added in control for each pectoral fin separately, one for each mouse button, in order to create drag and turn the fish. This turns the fish quickly but slows the fish down forcing the player to keep moving the tail or give up their forward momentum in order to turn faster.

The final challenge with this project was how to make the fish move up and down. I wanted to keep the control scheme all on the mouse to make it simple and there were no buttons left to control a swim bladder. The concept of a swim bladder is also difficult to explain to the player so I took inspiration from aircraft. I made the pectoral fins angle up and down with the mouse in order to control the fish's pitch. While unrealistic I felt it wouldn't ruin the player's suspension of disbelief. You can see how I calculated the force applied by the pectoral fins below.

Postmortem

What Worked

The players I had test the prototype reported that they felt like they were controlling a fish. Moving the fish with the tail was easy for them to grasp and they felt that part of it was easy and intuitive.

What Didn't

Testers had some trouble getting the hang of the pectoral fins. They couldn't see the fins move when they pushed the mouse buttons and so didn't understand what the buttons did. Additionally, balancing the fish's movement to make it feel good was very challenging. While testing the fish felt slow and less responsive than desired.

Conclusions

The unique take on controls for a fish is something that players find interesting and intuitive. By mimicking the movement of the animal I created a control system that made players feel as if they were in full control. Ultimately the success of this system moving forward would be contingent on balancing the system to make it feel easy to use and exciting. A comprehensive camera system specially designed for this type of movement would also be necessary in order to transition this system into a larger game.

Documentation