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