FPGA Virtual Air Hockey

By Ping-Hong Lu

A virtual air hockey game was designed that blends together many aspects of
embedded systems design in electrical and computer engineering to create an interactive
game that is sophisticated yet intuitive to play. The video game is implemented on the
DE2 FPGA educational development board made by Terasic for Altera's Cyclone II
processor. The FPGA is used in combination with a CCD camera for video input as well
as a monitor and speakers for game output. The camera tracks movements of LED
paddles through image processing techniques and the players move the paddles to strike
a virtual puck which is displayed on the monitor along with the on-screen paddles. In
addition to synthesizing basic hardware on the DE2, a general purpose CPU, called the
Nios II, is also instantiated on the board, which runs high-level C code. The dynamics of
the game is coded in C. The result is a fully interactive game in which the users'
movements of LEDs register as movements of paddles in the virtual air hockey game,
accompanied by sound.

Full Report (PDF)

Source Code (ZIP)