TOWER-DEFENSE GAME / ESP32 APPLICATION
Pixel Tower Defense
A 20-level tower-defense game for M5Stack Tab5, with every pixel and sound generated in code.

About this project
About this project
Twenty levels of build-a-maze tower defence on the M5Stack Tab5's 1280×720 touch panel, with five tower types, nine enemy kinds including air units and healers, and nine boss abilities — up to two bosses per level. The rule that shapes everything is that no asset files exist at all: the 5×7 Latin font is 95 hand-written bitmaps, the 16×16 Chinese glyphs are generated from the game's own string table, sound effects are synthesised square waves and LFSR noise at build time, and every sprite is a stack of rectangles. Maps come from a Python layout tool, and difficulty moves through buildable space rather than bigger numbers. A PC simulator compiles the real sources and plays all twenty levels under 370 assertions. Flash with PlatformIO, or erase-flash first and then write the merged image at offset 0x0.
From the README
From the README
- Display
- 1280×720 MIPI-DSI, 40 px cells, 32×14 grid
- Constraint
- the repository contains zero asset files
- Fonts
- the 5×7 font is 95 hand-written bitmaps
- Flashing
- Always esptool erase-flash first
Hardware
Native board: M5Stack Tab5
Boards: M5Stack Tab5 (ESP32-P4)
M5Stack Tab5 with a 1280 × 720 touchscreen. A source-based desktop simulator exists in the repository.
Media credit & rights
Upstream project media · rights remain with its owner · Credit: andjiang0083
Captured from the upstream desktop renderer at the pinned commit. Scene controls replay recorded frames; they do not run firmware. License notices are included in the preview package.
View original source ↗ Copyright & removal · Reviewed
More projects on these boards
ESP32 Mac II Esp32emu Matrix Rain Tab5 Tab5 Home Screen
Same use case
See what an ESP32 project looks like, and whether it runs on your board.
FILTERS
Browse by form factor. Check the exact board, chip and peripherals before installing.
Try a project
Newest listings
Give your project a little spotlight.
Repository links do not imply author endorsement or verified hardware compatibility. Check the upstream safety guidance before powering or flashing a build.