Rick's Tech Talk

All Tech Talk, Most of the Time

Rick Umali's Tetris

I finally finished my version of Tetris. It's a Windows game. To play on your PC, download the installer below.

rtsetup.exe (766.18 KB)
The C++ source code is now on Github below.
Rick's Tetris on Github

Game Play


The game starts out "slow", but it does get frantic by the time you get to level 5. It takes only 10 cleared lines to increase the level, so after that easy first level, you're going to need to concentrate.

Shape Statistics


I thought counting the number of each shape as it appeared would be a great thing to see. Now that I built this feature, I question its usefulness. The game currently draws from a "bag" of seven shapes, and when the bag is empty, a new set of seven shapes is tossed into the bag. By the end of the game, the shapes are going to be roughly equal, which is what the stats show. What I really have to build is the "preview next shape" window.



I followed the Tetris Wiki, which taught me all I know about the tetrominoes, the scoring system, and the actual "mechanics" of the game.

The game is written in C++, using the Minimalist GNU for Windows (MinGW). I used Vim (and yes, by the end, I missed using an IDE). I used the Simple DirectMedia Layer (SDL) for the graphics. The installer is Jordan Russell's Inno Setup. My C++ source code is available at Github.

The Lazy Foo SDL Tutorials and André Lamothe's Tricks of the Windows Game Programming Gurus (2nd Edition) helped me "get up to speed."

What's Next?

There's lots next! Sound. Score display. Better animation. Configurable scoring systems. Controlled free fall. But what's likely next is my implementation of Breakout.