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.

Frame rates measured on the board
Drawing styleFishing FPS
Gaussian splats
Fuller trees
35.2
Triangles
Crisp plank seams
34.3
Surfels
Soft branch edges
29.5
Triangles give the boat's planks sharp edges. Individual pine needles break into isolated pixels. Gaussian splats soften the seams between planks. The float and the trees have fuller outlines. Surfels draw the same fishing boat and give the pine branches a softer outline.
From left to right, triangles, Gaussian splats and surfels (screens grabbed from USB).

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)

Rowboat, hallway, fishing boat. Godot TPS demo by Juan Linietsky and Fernando Miguel Calabró, CC-BY 3.0.

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.

A wooden rowing boat's bow on teal water at dusk, with an orange tree on the horizon The rowing boat scene drawn with surfels
The shooter demo's hallway: red and white chevron barriers in front of metal walls, pipes and a lit railing The shooter demo's hallway drawn with surfels, slightly smoother than the Gaussian version
Gaussian on the left, surfels on the right. Godot TPS demo by Juan Linietsky and Fernando Miguel Calabró, CC-BY 3.0.

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.

Six squadrons circle the planet.
Dozens of spaceships above a blue planet with white clouds: grey fighters with blue stripes, yellow fighters below, cargo ships with coloured containers in the distance A close escort fighter crossing the view with more squadrons behind it, above the planet's darker side and its glowing atmosphere
Escort fighters up front, cargo ships in the distance.

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.

Rain falls through the blue fountain.
A stone stage at night with pillars: a blue fountain of particles over a pedestal, white rain streaks, a small fire and a spray of golden sparks, with a crate in front The same stage from another side: a round golden burst on the left, the blue fountain in the middle and sparks on the right
Watch for the gold burst to the left of the fountain.

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.

Ka'Zhurn idles, then swings his axes.

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.

Ka'Zhurn's horned skull close up in the compact subtype, smooth and slightly soft The same close-up in the Gaussian subtype, with more small highlights and a speckled texture The same close-up in the surfel subtype, close to the compact one
Ka'Zhurn's whole body mid-taunt, axes out, on a stone floor, in the compact subtype The same moment of the taunt in the Gaussian subtype The same moment of the taunt in the surfel subtype
From left to right, compact, Gaussian and surfel. Look around his eyes.

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.

Aldric slides along the arena wall and stops at the block.

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.