Progress Update on the Godot-to-ESP32-P4 Exporter Plugin
· 7 min read
By Phil · building Legitsauce
I’m building a handheld small enough to hang off my keys that can still play the kind of 3D games I like to make. I’m aiming to sell it for under $100. Before I put one up for sale, I want a handful of games running smoothly on it. That’s the project I introduced in Meet the Saucelet.
I make my games in Godot, and I’m building an exporter called Squeeze to get them running on the ESP32-P4, an inexpensive chip that’s easy to get hold of. For some games, I’m trying Gaussian splats and surfels. They draw a scene with lots of little dots or discs, which can give it softer edges on a screen this small. For other games, I like the crisp shapes I get from triangles. I want to be able to pick whichever look suits the game.
Right now, I’m running individual scenes from my fishing game and Ka’Zhurn on the Saucelet. Getting both full games running is still the goal. I’m tackling it one piece at a time: I build a small demo for each set of Godot 3D features I want to export, so I can see what works and what slows things down. Each section below shows one of those demos. First up, one view from my fishing game, rendered three ways.
| Drawing style | Fishing FPS |
|---|---|
| Gaussian splats Fuller trees | 35.2 |
| Triangles Crisp plank seams | 34.3 |
| Surfels Soft branch edges | 29.5 |
techdemo-triangle / The fishing boat
Triangles draw the boat from its original Godot model. They're my pick for the deck. Look up from the planks, though, and the distant pine needles break into single pixels.
techdemo-splat / From boat to hallway
The below clip shows me turning using the Saucelet's dpad or joystick on two different scenes, staying at full resolution (240x240)
techdemo-surfel / The same trip in flat discs
Surfels paint with flat ovals. Compare the bow of the rowboat, then the red and white stripes in the hallway.
techdemo-instancing / 200 ships
See those grey fighters with the blue stripes? I made that fighter once. The Saucelet draws it in different spots and turns each copy to face the way it’s flying. That’s instancing. It’s how I can put 200 ships over a planet using only four ship models.
Compact splats take up less memory, so the ships and planet fit together on the chip. The fleet circles at about 41 FPS.
techdemo-particles / Rain and sparks
Rain streaks past a stone pedestal while gold sparks fly. With the fountain, rain and fires all going, the stage runs at about 55 FPS. Press B and the effects disappear.
techdemo-skinning / A familiar boss
I brought Ka'Zhurn over with 13 animations. Firelight catches his horns as he turns. The compact version ran at about 56 FPS from the fight camera.
Compact, Gaussian and surfel subtypes
Up close, Gaussian dots pick out little glints on his forehead. Compact discs give his face a smoother finish. Pull back to the fight camera and it's easier to see the pose of his axes.
Coming soon
Aldric can already walk and run around the arena. Next I want to put his gear on him and bring back the game's HUD.
Earlier builds cover why I picked this chip, the first frame and how Squeeze runs Godot games.
Aldric and Ka'Zhurn still move a little awkwardly. I'll polish their animations when I get back to the game. The renderer is working well.