LX' Arduino Tetris
A goal I set for myself for easter 2018: get a Tetris game running on a 32x32 LED matrix panel. This one uses Arduino/Genuino Uno as controller, which is rather limited in memory as I experienced. Large parts of the project consisted of finding ways around those limitations. Maybe I'll do a Arduino Mega adaptation for more memory in the near future.
The panel's wiring is just like suggested in Adafruit's documentation. The rest is just a resistor ladder for the four control buttons.
A demo of the game in action:
Full source code of the latest version can be found on GitHub.
EXPANDED TECHNICAL DETAILS
Classic Game Logic Implementation
LX' Tetris is a software-heavy project that recreates the iconic puzzle game on an 8x8 or 16x32 LED matrix.
- Array-Based Collision: The "Well" (the game board) is stored as a 2D array. The firmware checks for bitwise overlap between the "falling piece" and the "settled pieces" every clock cycle.
- Rotation Matrix: Uses pre-defined coordinate rotates for the 7 Tetriminos (I, J, L, O, S, T, Z), ensuring they spin correctly within the grid.
Hardware Feedback
- Audio & Visuals: Includes a buzzer for "Line Clear" sound effects and uses color-switching logic if an RGB matrix is used, providing a truly "Game Boy" like experience in a DIY form factor.