{"schema_version":1,"id":"pixel-tower-defense","name":{"en":"Pixel Tower Defense","zh":"像素塔防"},"summary":{"en":"A 20-level tower-defense game for M5Stack Tab5, with every pixel and sound generated in code.","zh":"面向 M5Stack Tab5 的 20 关像素塔防，画面与声音全部由代码生成。"},"purpose":"tower-defense game","tier":"community","author":"andjiang0083","repository":"https://github.com/andjiang0083/pixel-tower-defense","license":"MIT","shape":"wide","scenes":["games","art"],"boards":[{"name":"M5Stack Tab5 (ESP32-P4)","page":"https://esp32gallery.com/boards/m5stack-tab5/"}],"native_board":{"en":"M5Stack Tab5","page":"https://esp32gallery.com/boards/m5stack-tab5/"},"motion":true,"hardware":{"en":"M5Stack Tab5 with a 1280 × 720 touchscreen. A source-based desktop simulator exists in the repository.","zh":"带 1280 × 720 触屏的 M5Stack Tab5。项目仓库包含基于同一份源码的桌面模拟器。"},"notes":{"en":"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.","zh":"一块 M5Stack Tab5 上打塔防：1280×720 触屏，20 关，路径从右边缘通向基地，五种塔各升三级，敌人有九类，包括直飞基地的空中单位和会治疗的小怪，九个 Boss 能力，每关最多两个 Boss。项目立了条硬规矩——不带任何素材文件：5×7 拉丁字体是 95 个手写位图，16×16 中文字形由脚本按字符串表现生成，音效在构建时用方波和噪声合成，所有画面都是 fillRect 堆出来的。地图由 Python 脚本生成，难度靠可建造空间而不是数值。PC 模拟器把固件源码编进去跑完 20 关，370 项断言；烧录前务必先 erase-flash，再写 0x0 的合并镜像。"},"readme_excerpts":[{"label":"Display","quote":"1280×720 MIPI-DSI, 40 px cells, 32×14 grid"},{"label":"Constraint","quote":"the repository contains zero asset files"},{"label":"Fonts","quote":"the 5×7 font is 95 hand-written bitmaps"},{"label":"Flashing","quote":"Always esptool erase-flash first"}],"images":{"type":"animation","primary":"https://esp32gallery.com/previews/pixel-tower-defense/poster.jpg","poster":"https://esp32gallery.com/previews/pixel-tower-defense/poster.jpg","sources":["https://esp32gallery.com/previews/pixel-tower-defense/cover.gif"]},"media_credit":{"status":"upstream-project-media","creator":"andjiang0083","source":"https://github.com/andjiang0083/pixel-tower-defense/tree/7f42d38118824873ccda4da10cf93239d7336562","note":{"en":"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.","zh":"从固定提交的上游桌面渲染器生成。控件回放录制帧，不代表浏览器运行固件。预览包保留许可证声明。"},"reviewed":"2026-10-20"},"preview":{"browser_playable":true,"kind":"interactive_recording","label":{"en":"Interactive replay","zh":"交互回放"},"width":1280,"height":720,"shape":"wide","source_commit":"7f42d38118824873ccda4da10cf93239d7336562","entry":"https://esp32gallery.com/previews/pixel-tower-defense/index.html","page":"https://esp32gallery.com/play/pixel-tower-defense/","package_sha256":"1fd93670100ec5f95332124a3c5c8dd15d9fd21747fb5970aa8fabe496937dca","version":"1fd93670100e"},"stars":0,"pushed_at":"2026-10-21T14:20:35Z","added_at":"2026-10-20T01:36:43+08:00","urls":{"html":"https://esp32gallery.com/projects/pixel-tower-defense/","html_zh":"https://esp32gallery.com/zh/projects/pixel-tower-defense/","json":"https://esp32gallery.com/data/catalog/projects/pixel-tower-defense.json","markdown":"https://esp32gallery.com/data/catalog/projects/pixel-tower-defense.md","play":"https://esp32gallery.com/play/pixel-tower-defense/"}}
