A Three-Quarter View on a Flat Canvas

Until version 15.0 the ship in TUNL was drawn from above while the cave around it was a side-on cutaway. Fixing that meant a small 3D model, a hitbox the picture was not allowed to outgrow, and a lot of restraint about what should move.

Devlog · 20 September 2026 · all posts

The mismatch

TUNL's cave is a side section. Gravity pulls down, stalactites hang from the ceiling and the approach at the start of every run is a dusk skyline. The ship was the one thing in it drawn from directly above, like a top-down plan of an aircraft flying through a picture of the side of a mountain. Players do not usually articulate that, but it makes the ship feel slightly pasted on.

The obvious fix, drawing a plain side view, would have thrown away the top-down silhouette the ship is recognisable by, and the ship's shape is at its best seen from above. The compromise is a three-quarter view: a 3D model of the same hull, turned out of the top view around its long axis and projected flat.

A tiny renderer

There is no 3D library in TUNL and no build step, so the renderer is small. The hull already existed as a set of flat facets, lit from above, with the top half mixed toward white and the bottom half toward near-black. The 3D version gives each facet a third coordinate, rotates the model around the long axis, projects it orthographically and fills each face in the same flat, lit-from-above style. It comes to about 90 visible faces filled per frame, compared with about 40 fills for the flat hull. There is no blur, which matters because blur is the expensive call on a phone's web view, and the glow is a single radial fill. If a weak device ever struggles, the obvious cut is to cache the hull per roll angle in an offscreen canvas.

The hitbox is the boss

The most important constraint is that collision does not change. The ship's hitbox is a circle, and the whole game's difficulty was tuned against it. So the 3D picture is not allowed to look bigger than the circle, and not allowed to look so much smaller that the ship "dies" before the wing visibly touches anything.

That turned the roll angle into a measurement rather than a taste call. Tilted 45 degrees out of the top view, only the near wing reads and the picture covers just over half to about four fifths of the circle's height. At 90 degrees it is simply the old top view again. At 60 degrees both wings read and the span is back to around 85% of the circle. I built a small lab with five candidate views and a coverage curve, and picked 60. A test now asserts that at any roll and any wing sweep, the drawn hull never reaches past the circle and never past the flat nose, and that it still fills a healthy share of the circle while flying.

What moves, and what deliberately does not

Once the ship was a 3D object, it was tempting to animate everything. Most of that got cut. What survived has to carry information:

What did not survive is a free-swinging wobble. An earlier variant where the ship "swung after" a movement looked lively, and it was noise: in a game whose only skill is reading distances, a hull that oscillates for its own sake competes with the information you need. It is the same reasoning that got a parallax background of far rock silhouettes removed the same day it was added. In a game about reading where the walls are, a second set of shapes moving at a different speed is a distraction, even at low contrast.

Paint on a 3D hull

The ship's six paint finishes were designed for the flat hull, in planform coordinates. Rather than redraw them, I used a small piece of geometry: at a given roll, the top surface of the hull projects to exactly the planform, squashed vertically by the sine of the roll angle. So the existing painter runs under that squash and is clipped to the 3D silhouette. The two things that cannot be expressed that way, the facet seams and the rim, are traced in screen space.

One correction was needed for the 3D version. The flat hull has seven facets and the 3D one has around ninety, and drawing a light seam on every one turned the STEALTH finish into a lamp. So in 3D the seams run at half strength and skip small faces, and when the hull is nearly edge-on in the middle of a barrel roll, the pattern is skipped for those few frames.

What stayed flat

Only the ship in flight got the new view. The hangar, the shop and the share card still show the ship from above, because those are portraits of a ship, not pictures of a flight, and the top view is the one that shows the whole planform. The app icon and the store graphics are top-down portraits as well, and whether they should ever follow the in-flight view is an open question.

The full picture of how the ship is built and painted is on the ships page, and you can see it fly in today's cave.

Play today's cave