This project contains:

  • Board schematic
  • PCB
  • C++ firmware code for ATmega644p(a) (uses C++11 features, compiles in Atmel Studio 6.2 or later)
    • Animated menu
    • Games (support buttons or accelerometer control and high scores)
      • Snake
      • Tetris
      • Space invaders
      • Asteroids
      • Maze
    • UART-based control protocol
    • Debug mode
  • Winamp player visualization plugin
    • Three different visualizations
  • Board Debug Console C# code for Windows

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...

Read more »