Flappy Sub: An Underwater Take on Flappy Bird

By Chris Carroux

screenshot of game

Project Description

For my final project, I created a side-scrolling obstacle avoidance arcade game. The game is similar to the hit mobile game Flappy Bird in that the user controls the height of their character (in this case, a submarine instead of a flapping bird) by repeatedly hitting a key to keep it afloat. The player’s horizontal speed is fixed and gravity will pull the submarine down to the ocean floor if the player does not “flap” (hit a key to angle the submarine’s trajectory upward). Obstacles come at the player as they progress, and they must navigate around these obstacles or the game will end. If the player’s submarine collides with an obstacle or the top or bottom borders of the screen, an explosion effect will be triggered at the submarine’s location. The game keeps track of how long the player lasted and prints out their time to the terminal when the player loses. The obstacles otherwise continuously regenerate, so the game can continue indefinitely as long as the player continues to avoid the obstacles.

Texture-mapped models

Submarine

screenshot of submarine

Rock obstacle

screenshot of rock obstacle

Collision detection



Physics simulation



References