Fish Out of Water: Fish fight


Two fish try to keep control of a gold crown for as long as possible. Programmer for VGDC UCI’s 2016 Fall Game Jam as a part of the Fish Out of Water team.

Oct. 2016
Tile map programming, pseudo-3D, water simulation programming, character controls, debugging.

Github –



Fish Out of Water is a game made for UCI’s Video Game Development Club’s 2016 Fall Game Jam. The goal is keep the crown longer than the other fish without touching your opponent or hitting the coral, following the theme “can’t touch this”.

The game was originally purely top-down, but I felt it was a little boring. What I wanted to build was pseudo-3D like in Link’s Awakening. Then we could have vertical levels with changing water levels and really cool fill and drain simulations. Originally, the water was supposed to travel around the map, filling and emptying out of pools. However, it ended up being out of scope so we cut it.

I learned that fake-3D math is extremely annoying, since both depth and height used the same axis.

World Map

Sprites resided at the specific X, Y on a 2D grid and a height. Higher tiles required wall sprites to cover sprites “behind” them (at a higher Y).
Added sorting layer buffers between sprites to layer some sprites over others (like the fish).
Calculating player collisions as the moved from tile to tile became complicated. Needed to infer height between tiles in addition to the player’s current height above the tile to figure out if the player collided or not. Sometimes players would get stuck in a “height limbo” and start flying into the air instead of falling back down to 0 height.

Simulating Water

Used this presentation:
Tracked total water volume to simulate spilling over into new areas. Worked reasonably well. Had strange bugs where water spilled over into new tiles without completely draining from the source tile. Caused overall water level to rise uncontrollably. Looked funny though.
Water height was a separate value on top of tile map height. Originally players could sink into the water and slowly rise back to the surface, but inferring height on tile borders made this difficult to do. Players could only reside on the water’s surface.

Player Movement

Fish originally felt a little clunky.
Streamlined movement code using what I learned from previous projects.
Acceleration, max velocity, using a velocity/acceleration vector.
Also took into account the falling speed at one point.

The Level

Tall obstacles to hide behind.
Have players need to navigate on water or land.
Sections where players are rewarded for precisely controlling their fish in the water.


Chasing the other player was fun.
Moving around in the water was satisfying and fun, moving around on land was tedious and funny.
Add a tackle for fish out of water? Speed burst for fish in the water?
Add power-ups or play with more changing water level mechanics?
Fake 3D math is extremely annoying and probably not worth the headache. Easier to just build the game in 3D and use a orthographic camera.