How to Build an Arcade Obstacle Avoidance Game Using FPGA

Image result for obstacle avoidance game

Hello FPGA innovators! Remember the arcade obstacle avoidance game where blocks of pixels fall on you and you steer clear of them moving left or right? Today’s project attempts to re engineer the same game using a VGA and FPGA. Here, a pseudo random code is used to generate obstacles that fall down and buttons on the FPGA are used to move the cursor so that none of the obstacles hit it.

The only hardware required to execute this project is an FPGA board (you might need to adapt yours if different from the author’s), a computer monitor and connection cables. This is because the FPGA board has inbuilt push buttons that can be used to move the cursor of the game, and also has the necessary DACs and VGA interfaces required to run the game.

The coding done by the author is in VHDL and everything starting from a functional flowchart to running the bit file for FPGA has been described from steps 1 to 9. Since the buttons on the FPGA has a bouncing issue, a separate debouncer code needs to be run which is available on step 2. Details regarding the VGA, coding for random obstacles and checking for collisions and updating the game are given from steps 3 to 7.

Though the authors put in 50+ hours of effort and made a great attempt, the game still could be done in a lot more simpler ways. The main code is available in the introduction to spare other followers from putting in more additional effort, but starting from choosing a different FPGA board to running through basics of other games implemented using VGA and FPGA can end up delivering something better with a lot less effort.

Give it a try and have fun!

How to Create a Visual Audio Spectrum with a FPGA in 5 Steps



Hello FPGA lovers! Today’s post is an interesting one which helps us visualize the audio spectrum with the help of your FPGA and an LED strip. Using a VGA cable, the spectrum can be visualised in a computer monitor as well. The microphone on the FPGA used (you may need to adapt this to your own board) captures the surrounding sounds and uses the FPGA to convert it into a perceivable visual output. The author has explained the principle of working in step 2. The input audio signal is stored in 2 block RAMs. The 1st RAM consists of the time domain representation which is used for display in the VGA. The 2nd RAM consists of the Frequency domain representation using FFT which is displayed both in the VGA and the LED strip.

The Hardware required for this project is a FPGA board, USB A to B micro cable, VGA cable, 30 LED Strip, VGA display (PC monitor) and 3 male to male jumper wires. The author has used the PC monitor as the VGA display for this project. However you can use a dedicated LCD screen or any other VGA display if you choose to. The hardware connections are explained in step 3.

The code is available as a zip file in step 4. The author has dedicated steps 4 and 5 towards installing and generating the program for the board. The language used is VHDL and the code has been broken down into modules. The zip file consists of the source files, a readme file explaining the code, a .tcl file to automatically build the project and the .bit and .bin files for programming the FPGA.


By Mirceadabacan

Process VGA without Frame Buffers using FPGA

Hello explorers of the FPGA Kingdom! Today’s project digs into the scope of FPGA as a tool that can replace conventional techniques further. VGA or video processing through conventional means requires a frame buffer which stores a block of data regarding pixel information in the system RAM for video display which is transferred to the display device at the right time using real time means. FPGAs can replace these frame buffers in a novel way such that the system RAM utilized for this remains free at the cost of a little more real time computation.

The developers used a DE2-115 FPGA board along with a Wolfson Audio Codec to animate 4 characters on the screen such that they appear to be dancing to the beats of the music played. Apart from those hardware elements, a monitor (graphics module) was used.

The coding was done by the developers using MATLAB since the project requires the use of filters through DFT and MATLAB has functions readily available for this. THE DFT is used to filter out the lowest frequency component (which will be the percussions or beats) and then calculate the interval at which this repeats. Once this information is obtained, the music is passed on from the ADC of the Codec to the monitor through the FPGA for animation.

The graphics on screen are programmed in modules such as a “head” file, a “body” file, an “arms” file, and a “legs” file which induce movements to the body parts depending upon the information processed by the FPGA from the rhythm of the music played. For a detailed explanation regarding the project, design, testing and systems integration you can visit the developers’ page here.

The result of this project can be seen here.

Though the project is not a replacement to the fast and efficient way of processing VGA through Frame buffers, it certainly explores the academic value and versatility of the FPGA as a tool that can be used for multiple purposes.

By C. Archard and N. Levy

How To Make Simon Says Game With Your FPGA

Hi again FPGA people! Today I have another game for you to implement using your FPGA, Simon Says for 2 players. I know it´s a pretty old game but I promise you that it´s a very interesting project.

In this project you will have to make use of your hand skills both for coding and for connecting and playing with cables and stuff.

User input comes from a set of modified Rock Band drum kit.

WARNING: If you don´t want to play Frankenstein with your set of Rock Band drum kit, stop reading or find an alternative!

Right, so you will need a bunch of things to modify your drums: a breadboard, some resistors and caps, two dual retriggerable monostable multivibrators, wire and a ribbon cable. Everything is very well detailed in the article and they have even shared the schematics as well as all the project files. Click here to download them.

The other two major modules for this project are the output to a VGA monitor and the store & check module that compares the inputs from the two players to determine whether they match or not.

For the code the authors used Verilog HDL. I always recommend you to think and write your own code instead of just copying what is given, but this time I won´t. I would just say copy it and implement it. Then, try to develop any of their suggestions for improvements. We would love to hear what you have achieved.

Have fun!


By K. Akiko

Quick Guide: 4 Easy Steps To Play Snake on Your FPGA

Hello FPGA lovers. I am sure you are going to love today´s post: How to implement Snake Game on your FPGA. Maybe some of you are too young to remember this everlasting game that has been popular generation after generation on a wide variety of formats. And as it couldn´t be less, Snake Game deserves to be played on a FPGA.

The tutorial I am presenting today was developed by a group of students from the University of Manitoba.  The project has 4 simple steps and all the hardware that you will need is your FPGA, a VGA monitor, a PS/2 keyboard, a USB cable and a power cable. Easy stuff here. Sorry for those hand-work lovers. More on that in future posts.

Well, getting back to the snake. According to the authors the more difficult parts to develop where the VGA output and the PS/2 keyboard input, as there is not too much information available on internet for its coding using Verilog. Read this, if you want to learn useful basics that will help you in future projects.

The FPGA that they used was an Altera DE2 Cyclone IV. Thus you may need to adapt the Verilog program to your FPGA. You can download the whole code here.

Another aspect I would like to highlight for you, it is their approach for coding the snake itself and what it eats, apples (funny uh). No they are not from IBM. Anyway, you may like to make your snake carnivore or a sweet lover so read these steps up and play with the code. Make your snake a dragon that eats carrots or whatever you want. This is the magic of coding.

We would love to see your modifications!

But as always, have fun!


By D. Lovegrove, I. Sweetland, K. Jacobson & R. Alves

9 Steps Away Of Playing Pong With Your FPGA!

Hello all FPGA lovers. Today we have got a fantastic step-by-step article that will teach you how to implement the Pong Game in your FPGA in 9 simple steps, so you can play with it as if you were using a computer.

This project is a purely VHDL coding one, and guess what? All the code is given, so just follow along the instructions. (Click here to download the code files).

The game is controlled using two push buttons, already built in the FPGA kit used, to move the bar to the left and right, accordingly. I would challenge you to try and modify this by making it controllable from a keyboard or a mouse, left and right clicking.

Just an implementation project if you have a DE0 Cyclone III kit, but if you don´t, it will become a little bit of fun to adapt it to your FPGA.

We would love to hear your comments about it!

Have fun!

By vigneshraja

Stuff A Lot Of Brute Power On Your FPGA To Crack A MD5 Password


In today´s article we present a project developed by students of the University of Illinois. This guy and his partner used the parallel power of the FPGA to create a hardware system which basically consisted of 16 MD5 cracking units-which were able to produce more than 700 million hashes per minute-, a keyboard control system to manage the user input and a VGA control system to handle the output through to the screen.

Unfortunately for those who like to get dirty with hand work, this project is too clean. They just needed a FPGA, a keyboard and a screen. No need to cut, wire, solder, plug, etc. Sorry.

Also, these guys did not publish any document, but they have a very useful video that explains everything. The truth is that this project is pretty much about the VHDL code they used and the construction of the digital circuit, which is very well explained in the video.

On the bright side, we have to be thankful because all the code and modules are available for downloading, so…easy.

As we always do, we do not recommend any illegitimate use of this article. Just try to replicate it and learn about FPGA´s and their power.

Have fun!

By Patchy