Welcome to the Tetris on Basys 3 FPGA project! This is a recreation of the classic Tetris game, implemented using finite state machines and hardware design principles. The game is designed to run on the Basys 3 FPGA board, featuring VGA output for live rendering and a 7-segment display for score tracking.
- About the Project
- Features
- Getting Started
- How to Play
- Implementation Details
- Future Enhancements
- Acknowledgments
This project brings the timeless fun of Tetris to the Basys 3 FPGA platform. The game logic is implemented using finite state machines, with several sequential components driving the gameplay. Players interact with the game using buttons on the Basys 3 board, while the VGA output provides real-time visuals of block movements and interactions. The 7-segment display tracks the player's score, which increases as rows are cleared.
- Platform: Basys 3 FPGA
- Game Logic: Finite State Machines (FSMs)
- Output: VGA for live visuals
- Score Tracking: 7-segment display
- Control: On-board buttons for gameplay
- Classic Tetris gameplay with seven different tetromino shapes.
- Real-time rendering via VGA output.
- Score tracking based on cleared rows.
- Hardware-based implementation using Verilog HDL.
- Intuitive controls mapped to Basys 3 board buttons.
To run this project, you will need:
- A Basys 3 FPGA development board.
- Xilinx Vivado software for synthesis and programming.
- VGA monitor for visual output.
- Clone or download this repository to your local machine.
- Open the project in Xilinx Vivado.
- Synthesize and implement the design.
- Program the Basys 3 board with the generated bitstream file.
- Connect a VGA monitor to the board and power it up.
- Use the on-board buttons to control tetromino movement:
- Left Button: Move block left.
- Right Button: Move block right.
- Center Button: Reset.
- Clear rows by completing horizontal lines without gaps.
- The game ends when blocks stack up to the top of the playfield.
Scoring is displayed on the 7-segment display, with each cleared row adding to your total score.
The game is driven by finite state machines (FSMs), which manage:
- Tetromino generation and movement.
- Collision detection with other blocks and boundaries.
- Row clearing logic.
- VGA Output Module: Handles rendering of blocks on a connected monitor.
- Score Display Module: Updates and displays score on the 7-segment display.
- Control Logic: Maps button inputs to gameplay actions.
The project is implemented in Verilog HDL and tested using Xilinx Vivado simulation tools.
Here are some potential improvements for future iterations:
- Add sound effects using an audio output module.
- Implement rotation features.
- Implement difficulty levels that increase block drop speed over time.
- Include a pause functionality using an additional button or switch.
- Expand score tracking with multi-digit displays or external displays.
This project was inspired by the classic Tetris game and serves as an educational exercise in hardware design using FPGAs. Special thanks to resources and tutorials that guided the development process.
Enjoy playing Tetris on your Basys 3 FPGA!