Tetris

Start Screen Image 2 Image 3 Image 4

Description: Player controls various geometric shapes (these pieces are displayed on the home screen) via Personal System/2 (PS/2) keyboard. The game is displayed through a Video Graphics Array (VGA) display, where one piece will continously descend on the game board. The main objective is to strategically stack each piece to form complete horizontal lines, at which point the row will be "cleared," the row will disappear, and as the blocks above fall down to fill the gap, 1000 points are added to the player's score. Players must continue clearing rows and gaining points as long as possible without any stack of blocks reaching the top of the board. Else, the game is over and players will be given the option to retry.

    Featured:
  • Processor polls the PS/2 keyboard inputs and clears the FIFO (first-in first-out) data registers.
  • A scoring algorithm to checks for and stores cleared rows, accordingly dropping the remaining pieces on the board down by the number of rows cleared.
  • A game logic algorithm to handles input-based piece movements as well as collision logic and move validity according to board boundaries and already placed pieces.
  • VGA uses double buffering when rendering to achieve a smooth visual experience.
  • The audio interface is triggered to output sound effects when either a row is cleared, a shape collides with another shape, or the game is over.

FPGA
DE1-SoC Board