Arduino color TETRIS for VGA monitor

Hello to all,

I have reproduced a color version of the classical game TETRIS running for a VGA monitor, by means of a bare Arduino Uno and few other components.

The goal was avoid any special shield or supporting IC. The only needed components are four buttons, few resistors and a DSUB15 connector (the standard 15 pin VGA one).

You can see how it looks in this video:

The simple schematic is shown in the picture below.

I used Arduino IDE 1.6.4. and the VGAx library done by Smaffer and publish on GitHub here.

This library allows to use four color with a resolution of 120 x 60 pixels, not many but enough for this retro-game. I optimized the graphic for a 4:3 VGA monitor. The wide-screen is too deformed at the moment, but I plan to write a version where you can choose the monitor type.

The code is pretty messy but the game runs smoothly, it has a score bar and speed increment when you go to the next level.

The “beta” version is available at the end of this post. There are few minor bugs to fix but the game is totally playable. Further details can be found in this Instructables.

As usual,

PS see other color classical games for VGA in my previous post here.

PPS (June the 28th 2016) version with sound is ready! The speaker must be connected to pin A0.

VGA_Tetris.beta.ino (19.5 KB)

VGA_Tetris_Sound.ino (20 KB)

I'm going to build soon!

Can you make a Space Invaders? :grin:

Sorry but I can't, first of all for the physiological lack of time :sob: ... ...but I think it is really challenging to control all the (many) moving parts. Already with Snake and Tetris I am at the limit of the variable memory (up to 95%). You should use sprites for the aliens, cannon and ships but, even if this is possible with the vgax libraries, I do not know how to do...

...But if anybody wants to give a try, I will be candidate as a volunteer for the beta testing! ;)


I'm trying to play your project because I'm learning how to use arduino. You said that the speaker could be put on port A0, but I could not find a line of code where you are. Because when I do not count any monitor the speaker beeping uninterruptedly and the game does not start, can you help me?