Jacob Engelhardt

Tetris in C++

-Click here for project's Git repository-

As part of the course "C/C++ 4 - Games in 2D" one of the assignments instructed us to program a game using C++ and the raylib library. Some requirements included having more than 3 game states, a collision testing screen and a list of high scores that was saved to and read from a file. I decided to recreate Tetris on the Gameboy since it would require a different approach from the top down character centered games I was used to from previous projects. The scope also seemed reasonable in the context of the assignment.

Throughout the project I would play Tetris to analyze how each gameplay element worked and attempt to capture the same feel as playing the original on the Gameboy. This challenged my ability to think in code by taking a familiar game experience and having to translate each element into coding logic. It helped familiarize me more with programming tile systems due to Tetris' grid based systems. I also utilized file reading and writing for the first time to save high score data. The most difficult and bug prone parts to get right were the rotation and collision testing of falling pieces. I went the extra mile to have each block rotate just like they do on the Gameboy, which meant shifting them to align correctly. An additional challenge was figuring out how the code as a whole should be structured since gameplay didn't revolve around a typical player character on screen like I was used to.

The feeling of playing on your Gameboy during a roadtrip