EE2026: FPGA Project

EE2026: FPGA Project

Feb 2025May 2025

Role: Digital Design Engineer

This project implements a real-time four-player fighting game across two Basys 3 FPGAs. Each board handles two local players and renders game state to a VGA display while synchronising player actions over a custom inter-FPGA communication link. The design required deterministic timing for video generation, input handling, physics updates, and audio output.

System Architecture

Entire monitor, keyboards, and system is set up for playingFull setup

The game engine is structured as a synchronous hardware pipeline driven by a global frame tick. 4 player inputs from 2 keyboards (arrows and wasd provides for 2 different players per keyboard) are debounced and converted into action commands that feed a character state machine. Movement, attack cooldowns, health updates, and collision detection are computed once per frame, ensuring consistent gameplay speed independent of rendering.

Ultimate ready indication

Video and Rendering

A VGA controller generates pixel coordinates which are used to index sprite ROMs for characters, projectiles, and UI elements. Priority compositing ensures correct layering of players, attacks, and background tiles. Health bars, ultimate meters, and character indicators are rendered using a separate overlay path to avoid modifying sprite assets.

HUD displayOn-board display showing health, ultimate status, and character selection

The 7 segment shows the health of each character. The positions correspond to the characters' positions on the OLED screen. The LEDs on the Basys 3 charge up as time goes by (at different speeds for different characters), and will start blinking once it is ready.

Inter-FPGA Communication

The two boards exchange player state and action packets over a parallel link. A lightweight protocol encodes position, health, attack state, and ultimate triggers.

Game Logic and Balancing

Character attacks on the screenDifferent attack styles for each character

Each character is implemented as a parameterised hardware module with configurable movement speed, attack rate, damage, and health. This allowed rapid balancing without modifying the control logic.

Two characters dead on screenDead characters replaced by tombstones

When a character’s health reaches zero, the module transitions to a tombstone state that removes it from collision checks while preserving its screen position.

Audio System

Sound effects are generated using a PWM audio module triggered by attack and ultimate events. Tone frequency and duration are stored in ROM, allowing multiple effects without increasing logic complexity.

Final Implementation