Mimimalist Arduino Gaming Platform

A pretty color LCD screen, an Arduino, a buzzer and a joystick is all you need for a minimalist gaming console for under $20. At least, that’s all [João Vilaça] needed to get this sweet version of Tetris up and running. He’s working on Breakout right now. His Breakout looks even better. See the postscript below for details.

It’s a testament to the current state of the hardware hacking scene that [João] could put this device together in an afternoon for so cheap, presumably after waiting a while for shipments from China. The 320×240 SPI color TFT LCD screen used to cost twice as much as this whole project did. And wiring it up is a simple matter of connecting this pin to that pin. Almost child’s play.

Equally impressive is the state of open source software. A TFT library from Seeed Studios makes the screen interface a piece of cake. [João] wrote his own sound and joystick code, and of course the Tetris gameplay itself, but it’d be much more than a few weeks’ work without standing on the shoulders of giants. Check out [João]’s Github for the project code and stick with us after the break for a demo video and some of our other favorite Arduino gaming hacks.


Now, we’ve seen a whole lot of Arduino-based gaming platforms around here before, and they range from the simplistic black-and-white to the bells-and-whistles of the Gameduino which tacks an FPGA onto your Arduino to enable sprites, awesome sound, and VGA output. But we’ve also got a place in our hearts for simplicity and comprehensibility, and [João]’s device and code has got those in spades.

If you’re ready to push your Arduino skills beyond blinking LEDs, [João]’s game project should be on your reading / building list. We can’t wait to see Breakout.

Postscript: [João] finished up his Arduino Breakout game, and posted a video too.  The gameplay looks incredible.  So smooth!

20 thoughts on “Mimimalist Arduino Gaming Platform

  1. that looks like the screen i have in my tin full of dev boards. i ported hackvision asteroids to it and added color.

    redraw times are horrible @ 16 mhz. the time to blank the screen was prohibitively long so i pretty much would draw the sprites, then draw them again in black at the end of the frame. everything you draw had to be undrawn. but i picked up some fps doing this. i think this was mostly because the library was under-utilizing the the capabilities of the controller.

    what i want to do is use my due and see if it is fast enough to do a proper blanking pass. it should also have enough cpu power to run a software 3d renderer i was working on.

    1. That’s how sprites were always done! Copy the area behind them to a buffer, draw the sprite, then for the next frame copy the buffer back, and start the whole thing again. Redrawing the whole screen from scratch just isn’t possible on 8-bit machines.

  2. These modules are pretty cool for the price. They can be a bit slow on Arduino (as opposed to Teensy), so I did some optimization work and made a “re-mix” of the Adafruit_GFX library (and several associated driver libraries, including the one for these LCD modules) that is approximately 3-14 times faster than the original Adafruit version (on a 328p Arduino). Here are some logic analyzer captures of SPI pixel drawing before https://i.imgur.com/lzW7FPP.png and after https://i.imgur.com/Oq8VonJ.png (the blue “chunks” on the channel 3 are bytes being transferred – same 8MHz SPI speed, but note the difference in gaps between them). It is using all static methods and no run-time virtual functions, but it is designed to be fully “sketch compatible” so just drop in Adafruit_GFX library code (with small init and library change). Library is located at https://github.com/XarkLabs/PDQ_GFX_Libs . A beta test user make a nice little 3D demo and video with it https://www.youtube.com/watch?v=8nZam2jpIqw

    1. I only knew about your library a few days ago.

      I plan on testing during the weekend and see if it makes sense to switch. I did not like much the Seeed studios implementation and played around with it and I see you already did some improvements I had planned for TFTv2.

  3. You did it! You made color video games possible with only 8mhz! Before this project, there was only one person to ever get such results from Arduino, by writing the whole game in assembly Arduino assembly is not something most of us want to fiddle around with, especially to make a whole game. What I see here, is like a half-assembly based TFT library. In other words, you have created the best Arduino library for creating color games! You are my hero, thanks!

    1. Doesn’t make any sense if you are paying $14 or so to get more horse power out of a 8 bitter. You might be better off start start off with a much better processor e.g. STM32F4 Discovery kit. Digikey sell them for $14.88

      168MHz ARM, 1 MB Flash memory, 192 KB RAM,, MEMS 3-axis accelerometer, audio DAC with integrated class D
      speaker driver

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.