A small 2D game running directly on an ESP32 + TFT — no PC, no streaming, just the microcontroller.
Overview
A game looks like a fun toy project until you actually try to make one on a microcontroller. Then you start caring about frame timing, partial redraws, input lag and memory in a way you never did before. That is exactly why I built this.
The ESP32 drives a TFT display over SPI and runs the whole loop on-device: state, drawing, input, collision, game-over screen. The graphics are intentionally simple so the focus stays on the loop, not the art.
ESP32 firmware maintains the game state, updates objects each frame, draws to the TFT over SPI, and checks physical input for player movement.
Project photos
TFT game display test on the embedded board.
Gameplay running directly on the TFT hardware.
Videos
Implementation details
Firmware
Firmware uses a timed game loop to draw the player, obstacles, collision states, score, and menu/game-over screens on the TFT display. Graphics are optimized for microcontroller memory and refresh-rate limits.
Components / BOM
ESP32 development board, TFT display module, Input controls, Breadboard and jumper wiring
Engineering challenges
The classic embedded-graphics trap is redrawing the entire screen every frame. Once you do that on a small TFT, the game starts feeling sluggish and flickery. Input latency is the other thing that quietly ruins the feel.
Solutions
Only redraw the parts of the screen that change, keep the game loop predictable, and read input separately so it never blocks the screen update.
Results & metrics
Plays smoothly on the actual hardware with score and game-over screens. Survives long enough sessions to feel like a finished little toy.
Future improvements
Add a high-score in EEPROM, a menu screen, sound, a couple of difficulty levels, and eventually a custom PCB so it can live in a small handheld shell.