Birdoggydog's Builds

Testing every wall kind in every theme and state in Godot

One test lays 24 kinds of dungeon wall in five themes, new and worn, and checks for gaps and fallbacks. Only cyberpunk has pieces for all of them.

I asked whether all the new walls work in every theme and in both states, and the answer was no. Only cyberpunk has wall pieces. So I had a test written that lays every wall kind in every theme, new and worn, and reports which ones are real pieces and which are just painted faces.

Did the new walls work in every theme?

Cyberpunk has a piece for every wall kind. Steampunk, eldritch and fantasy have only doors and grilles (7 pieces each, against 23 for cyberpunk), so their dungeons use a painted set instead and the ledge has no lip. The fifth theme, “house”, is what a floor with no theme gets. It is painted on purpose and has no pieces.

Ten first-person stills of a hall in a grid of five rows and two columns, one row per theme, in gray metal, brown panels, purple veined walls, stone blocks and gray blue panels.

The tall hall with its gallery, ledge and stair, from the same spot in each theme. New is on the left, worn on the right.

I filed one work-list item for each of the three themes that lack their walls, and one for something the sheet showed me. New and worn look almost the same in every theme, and in the painted ones they are identical. I said yes to worn painted sets for cyberpunk and house first, and those are being built.

How does the test lay everything?

The test builds two sheets, one of heights and one of curves. The sheet of heights has a tall hall with a gallery, a ledge with its lip, a step of wall over a lower and a raised square, a stair and a ramp with walls beside them, a smoothed half-meter run, a narrow passage and a crawl. The sheet of curves has a round room and a curved corridor corner. Each goes into five themes in two states, which makes 20 builds and 320 checks. All of them pass.

Ten first-person stills of a curved room in a grid of five rows and two columns, one row per theme.

The round room and the curved corner, from the entrance, in the same ten combinations.

To force a state I added a static DungeonInterior.forced. It is empty by default, and when it’s set to peak or decayed every square and every door on a flat floor is laid in that state.

The 24 wall kinds are one list in the test, KINDS. Each entry names the members a laid piece can be, the sheet it’s on and a probe, which is a ray at a spot on a square’s side that finds whatever draws it. For each theme and state the test sorts every kind into a piece, a painted face or missing. A cell that isn’t a piece only passes if the theme is listed with the work-list item that will build its walls. If the game gets a theme, a state or a member the test doesn’t list, it fails by name, so nothing is skipped quietly.

What does each build check?

First, no gaps. From every walkable square the test shoots 26 rays: straight up, straight down, and eight compass directions at slants of -35, 0 and 35 degrees. The compass turns are shifted a little off the diagonals, so no ray runs down the corner between four squares. That’s about 2,000 rays per build. If the plan has rock along a ray and nothing drawn comes before it, that’s a gap.

The rays don’t hit the game’s collision. They hit the drawn geometry, which I put in a separate physics space with one body per thing that draws. Each body is a ConcavePolygonShape3D. Nothing the game uses is in that space, so a ray sees what the eye would see.

Second, every piece stands on its floor. Third, the edging rules from the earlier hazard band fix hold on every build that laid pieces. Fourth, every piece, instanced mesh and door is in the state I asked for, and its file exists. Nothing is allowed to fall back to the other state without failing.

The first version of the gap check also found a wall that wasn’t drawn where it stood on a floor sunk below zero. That was the same bug I’d just had fixed from a film, so I left it to that fix and the test passes now.

Next is building the three missing wall sets and the worn painted ones.