Developer Builds Tetris and Space Shooter on a Two-Button ESP32 Microcontroller
A developer has implemented a Tetris clone and a Roguelite Space Shooter in C on an ESP32-S3 microcontroller that already serves as a network diagnostics tool. The biggest challenge was designing playable games for a device with only two physical buttons, solved in Tetris by introducing an auto-sweep system that moves pieces horizontally on a 200-millisecond timer, reducing required inputs to rotate and drop. Additional actions like pause, hard drop, and soft drop were unlocked through timed button gestures such as double-clicks and long holds. The Space Shooter features 30 enemy waves, three boss fights, and a Roguelite upgrade system, with memory stability maintained by pre-allocating static object pools for bullets and enemies instead of dynamic heap allocation. Both games run on the same FreeRTOS-based hardware alongside packet sniffing and other network tools, serving as a stress test for the ESP32 and the LVGL graphics library.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in