Inspiration

As Java devs, we wanted to dive into Python and create a project in a fun and classic fashion. Our debut? TETRIS!

What it does

TETRIS is a 2D game that involves 4-block shapes called "Tetrominos." Stack these Tetrominos in a way that clears a line before the stack reaches the top and you lose! This is a classic spin on the game with images of vistas from all over the world to help provide some traveler aesthetic. Use the arrow keys, LEFT and RIGHT to move the piece horizontally, and use the UP arrow to rotate clock-wise.

How we built it

In Java, we've built games using Java Graphics and GUIs out of JTable. In Python, however, we utilized pygame to be the core of our architecture for organizing the GUI. The GUI is separated into three main windows: 1) the main play space, 2) the queue, and 3) the score + level. Each window was developed in its own class. For the inputs, tetrominos, collisions, and line deletion, that is all in game.py.

Challenges we ran into

Getting familiar with Python was akin to translating our Java knowledge. Although we had some errors involving collision-detection, line deletions, and rotations, the main bulk of our time was spent understanding new documentation that we've never encountered. It was a fun challenge throughout the whole process, and we learned a great amount.

Accomplishments that we're proud of

In general, we are proud of the polished look of the game. We celebrated when we finally got rotations to work, and we greatly appreciate the nice scenery in the background. Intertwining traveling and TETRIS was quite difficult, but we are happy with the outcome and we feel a nice zen sensation with the background. Don't get your stack too high or else you won't be able to see it!

What we learned

We are now more familiar with Python and pygame. We also became more familiar with git and github in order to facilitate collaboration between developers.

What's next for Traveling Tetris

Although we are proud of what we have developed in this short amount of time, there can still be some improvements made to the game. There are a plethora of TETRIS rotation configurations that we can have players choose based off preference. Furthermore, we could add a 'HOLD' bay in addition to an indicator of where the Tetromino will inevitably be placed. This feature may be helpful when we implement a 'SLAM' control that allows Tetrominos to be immediately placed at the bottom.

Share this project:

Updates