Go Down

Topic: Arduino color TETRIS for VGA monitor (Read 2499 times) previous topic - next topic

rob_cai

Dec 21, 2015, 11:00 pm Last Edit: Jun 28, 2016, 10:52 pm by rob_cai
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,
Enjoy!

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.



Space_Invader

I'm going to build soon!

Can you make a Space Invaders?  :smiley-mr-green:

rob_cai

#2
Dec 29, 2015, 11:08 pm Last Edit: Dec 29, 2015, 11:15 pm by rob_cai
Sorry but I can't, first of all for the physiological lack of time  :smiley-cry: ...
...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!  ;)

danys

Hello,

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?

Go Up