- Diego Gonçalves Simao [email protected]
- Illia Solohub [email protected]
- Patrik Buetler [email protected]
Tetris++ is a reimagined version of the classic Tetris game, developed as part of the Computer Architecture course at the University of Basel. This project demonstrates the implementation of Tetris using Arduino hardware, featuring a unique interactive gameplay experience enhanced by gyroscopic controls and additional block types.
- Classic Tetris Gameplay: A faithful recreation of the original mechanics.
- Special Blocks:
- Explosion Blocks: Clear entire rows upon landing.
- Brittle Blocks: Fill gaps below to improve the player's board state.
- Gyroscopic Controls: Rotate and maneuver tetrominoes by tilting the device.
- 4x8x8 LED Display: Smooth and clear visual representation of the game.
- Arduino Mega 2560
- 4 LED Matrices (MAX7219)
- Gyroscope (MP6050)
- 5 Push Buttons
- Power Supply (9V)
- Jumper Wires and Connectors
- Resistors (10k OHM)
- 2 Breadboards
- ELEGOO Starter Kit: 67 CHF
- Gyroscope MP6050: 13 CHF
- 4x LED Matrices MAX7219: 19 CHF
- Total: 100 CHF
The source code is organized into modular components to facilitate readability and maintenance. Key files include:
blockLogic.ino
: Handles the logic for tetromino behavior.initFunctions.ino
: Contains initialization routines for hardware.tetris.ino
: Implements the main game loop.
- Clone the repository:
git clone https://github.com/PatrikBuetler/tetris-
- Assemble the hardware as per the provided circuit diagram.
- Upload the code to the Arduino Mega using the Arduino IDE.
- Power up the system and enjoy the game!
- Use the push buttons to move and drop tetrominoes.
- Rotate the blocks by tilting the device (enabled by the gyroscope).
- Watch out for special blocks that can help or surprise you!
- Transitioned from a brute-force approach to a structured pixel-based system.
- Developed custom logic for special blocks and integrated gyroscopic controls.
- Learned valuable lessons in hardware-software integration and embedded programming.
The source code in this project was developed by the project team as part of a university course. While parts of the logic and structure were inspired by the classic Tetris game, all programming and implementation were independently written by the authors. Any external libraries or components used are credited in the references section and the utils section. ChatGPT was used solely for improving the wording and structure of documentation and not for generating code.