This project contains:

Demo video of most features of the project:


The source code for MEGA TETRIS board is written in C++ and combined into the Atmel Studio 6.2 solution. Currently the board has the animated menu and supports several classic games (Snake, Tetris, Space Invaders, Asteroids, Maze); it has UART-based control protocol and the debug mode. Each game can be controlled using either buttons or accelerometer (this can be changed in the settings menu). All games save high scores, which are then displayed in the main menu (on a separate numeric display) and can be reset in the settings menu.

Main menu

Runs after startup. You can scroll through the options using the "up" and "down" buttons and select the option using the "right" button. When selecting a game, the numeric display will show the current high score for that game.

Options

You can enter the "options" menu from the main menu. Options can be saved by pressing the "left" button (the main menu will be loaded after this). Scrolling through options is performed using "up" and "down" buttons. Checkbox values can be changed using the "right" button. Brightness value can be changed using the "forward" and "backwards" buttons. It's possible to reset options to their default values by pressing and holding the "up" and "down" buttons before powering on the device.

Games

Each game starts with "3"... "2"... "1"... countdown and ends with displaying your final score (or your new high score, if you've beaten the old one). Every game can be paused by pressing "up" and "down" simultaneously. In the pause menu, you can press the "right" button to continue the game or the "left" button to exit to the main menu. Each game supports either button or accelerometer control (sometimes mixed), which can be changed in the options menu.

"Snake" game

Classic "Snake" game where you control a snake and eat food, which causes your snake to grow and earns you points. Moving speed also increases as you earn score. The numeric display will show your score.

"Space invaders" game

Something like classic "Space invaders" game. You shoot differently shaped space invaders and don't allow them to land on your shooting platform. They can shoot you, too! You have 5 lives. There are also some bosses in the game, which have a lot of lives and shoot you. These bosses don't fall down, but they're very strong and have some weak points which you can shoot. You can also damage a boss shooting anywhere at it, but in this case there's only small probability that your bullet will pass the boss armor. The numeric display will show your score.

"Tetris" game

Classic "Tetris" game. The more score you earn, the faster is the blocks fall speed. Some block figures are also added to the game after you reach certain score values.

"Asteroids" game

You control the plane which flies through a "cave" or something like that. Some asteroids fly towards your plane, you can shoot them down. Flying speed increases with time, the "cave" also becomes more tight. The ship is controlled using either the "forward", "backwards", "left", "right" buttons or the accelerometer. Use the "up" button to shoot. The numeric display will show your score.

"Maze" game

Generates random scrollable mazes, which become more and more difficult each level. You have limited time to find the exit. Control your movement using either the "forward", "backwards", "left", "right" buttons or the accelerometer. The numeric display will show how many seconds you have to finish the current level (yes, your time is limited!).

Debugger mode

Draws color changing dot on display. This dot can be moved either using buttons or the accelerometer, depending on settings. Draws dot coordinates on the numeric display, too. Can be stopped by pressing the "up" and "down" buttons simultaneously.

UART mode

Starts UART and waits for data to be sent from other device (e.g. computer). You can exit this mode by pressing "up" and "down" buttons simultaneously. Detailed protocol description is available in uart.h file of the project.


The project includes UART Debug Console written in C# to easily understand and play with the device UART protocol. It is written in C# + WPF. It supports:


The project also includes the visualization plugin for Winamp player. This plugin allows to send nice visual effect data to the board using the UART protocol. It supports: