Daniel Petersen's Blog

Documenting my struggle to make videogames, amongst other nonsense


Home Projects

Tetris + Ai

I actually made Tetris twice. The first time I was still pretty new to programming, and it took me about 3 weeks to make. The code was a hot mess, but hey, it worked.

A few months later I entered into a 48 hour game jam contest. I decided to try my hand at Tetris again, and managed to finish it in about 9 hours. The code was a lot cleaner, so overall it was a pretty good improvement over my first try.

After I finished the base game, I had an important question to ask myself… What do you do when you have a functional version of Tetris? I guess you make a Tetris AI, because hey, that sounds pretty fun. It took me about 2 days to create. For an explanation on how it works, see this post.

Built with C++ and SFML


Copyright © - Daniel J. Petersen