3d Tetris

3d Tetris is a reimagining of traditional Tetris into a 3-dimensional play spaces.
That means instead of moving in just the X-axis, the player now moves in the X and Z-axes.
Instead of rotating in just the Z-axis, the player can rotate the pieces in the X and Z-axes.
Conceptually simple, the added dimension actually greatly increases the difficulty of clearing layers and provides a unique and challenging experience.

Mobirise Website Builder
Presentation Video

Design Structure

3d Tetris can be broken down into three main components, the level, the shape, and the blocks.
Mobirise Website Builder
Level

The level contains important metadata for performing collision detection and game logic.

Mobirise Website Builder
Shape

The shape is the piece the player can currently manipulate. It uses the level to prevent the player from making illegal moves.

Mobirise Website Builder
Blocks

The blocks are the basic component of each piece. Both the level and shape are comprised of a series of blocks.

Linear Interpolation

For added experience, I implemented linear interpolation for the rotation of the shapes by the player. Because the level is designed as a grid, actually moving the shapes with interpolation would cause problems with the collision detection. Instead, when the player pushes a button to rotate the shape, a short animation is played, before the piece is put back in its proper position.

Mobirise Website Builder

How To Play

To start/unpause the game, push 'p'
Use 'wasd' to move the shape forwards, left, back, and right
Use 'WASD' (shift + 'wasd') to rotate the shape forwards, left, back, and right
Use [Spacebar] to quick snap the current shape down onto the level
Have fun!

Gameplay Demo

Don't judge, it's harder than it looks!

Sources

Starter Code

CSCE 450 Programming Assignment Code

Webpage

Designed with Mobirise

Libraries

OpenGL