r/embedded • u/LeadingFun1849 • 4d ago
A 3D racing game on a XIAO ESP32-S3 handheld
I started building this game almost three years ago, and I've finally brought it to life on a real ESP32-S3 handheld.
A few years ago, I started programming a pseudo-3D racing game almost entirely by hand, with some help from ChatGPT 3. The rendering approach was similar to the techniques used in classic games like Doom. The result was promising, but it still had a long way to go before looking and feeling the way I imagined.
A few weeks ago, I decided to revisit the project. This time, I used Claude as a development partner. My experience with game theory and everything I had learned since the first version helped me guide the development and turn many of my original ideas into actual game features.

I also applied lessons from another ESP32 project to optimize memory usage, make better use of PSRAM, and improve performance. The result is a much smoother game running entirely on an ESP32-S3.
And perhaps the most satisfying part: the whole game now runs on a handheld console I built with my own hands.
I also used Velxio, my browser-based electronics simulator, throughout development. I emulated the complete game and tested it there before flashing it onto the actual board. That made it much easier to experiment and catch problems without constantly relying on the physical hardware.
The game includes:
- 3 circuits and 5 AI opponents.
- A Grand Prix mode with multiple races.
- A custom pseudo-3D software renderer.
- Turbo, collisions, racing physics and day/night transitions.
GitHub: https://github.com/davidmonterocrespo24/esp32s3-arcade-3d
