Second Chance GazetteDevlogToken Use

A Gate in Every Hedge

unreal-enginecountrysidenavigationbewsallbusesracersclaude-codegta-vi

Sunday, and a computer that stopped at midnight

Sunday began with the usual disappointment. James had changed the setup so that the machine could run through until morning without him, and it stopped at midnight anyway. The computer-control session had reached its context limit, which is a ceiling on how much one conversation can hold, and it simply ended. Nothing was half-saved and nothing was running. It was not the first night the overnight queue had gone quiet early, and the cause this time was the plainest: a full conversation.

It was Sunday, so the gym came first, and then his parents in the afternoon. The game got the gaps. That suited the day, because the three biggest jobs were all the offline kind: the agent, Claude Code Opus 5.5, could do them at the keyboard with the editor closed or busy, and none of them needed a slot on the machine at the same moment.

None of it was placed in the level. That is worth saying up front, because it changes how the rest should be read. Everything below is a plan with checks passing, a Blender kit with renders, or a build that has not been played. The checks are real. The level is unchanged.

Fields with no way in

The first job was the empty ground between places. A British town does not stop at the last house; it gives way to hedged fields, a lane, a gate, a bit of rough ground with something falling down in it. GTA VI is a city with a coast and a swamp round it, and every open-world game since the first has had a green smear at the edge. A British drive has a hedge in it, and a gate, and somebody's field. The thread that opened on Sunday was to make the drive between two places worth looking out of the window for: trees and plants, fields with farm animals, a park, a monument, an abandoned building.

The agent wrote a planner that reads the road graph and the survey of what is already built, then lays out field boundaries and hedges around the gaps. By early afternoon it had a first plan. James read the output and sent one line back that changed the design:

Fenced off fields should have a gate that can be opened, or gaps in the hedges, so that every part of the map is explorable.

The agent had been splitting boundaries per field, which meant a field with a hedge on every side was a perfectly legal output. It was also a sealed box. The planner was rewritten to split boundaries per pair of neighbouring fields and to give every pair, and every outer edge, an opening: a gate where the boundary meets a road or holds livestock, a gap in the hedge anywhere else. The check that matters is the one that fails the whole plan if any field cannot be reached. It printed 24 of 24. Sixty-one gates, forty-five gaps.

The gate openings are 4.0 metres because the gate in the Blender kit is the standard twelve-foot five-bar, with the brace running from the bottom of the hanging stile to the top of the shutting stile. The placer leaves each gate opening empty until the openable gate exists, so nothing is closed off in the meantime.

A red car seen from outside beside a metal crash barrier on a grass-banked road, with its roof and seats visible and a bright sky of broken cloud above scattered young trees on a rolling green hill.
A red car beside a crash barrier on a grassy rolling road, young trees scattered on the hill beyond.

That is a frame from the passenger-ride camera built for the racers' promo shoot, and it is here because it is the view the fields are for: hill, trees, a road. The grass is bare. The plan is for hedges, fields and something grazing in it.

The kit has nine meshes so far, with collision, and the doorways in the cart sheds left walkable. A pillbox was sized to the published specification for the wartime type 22, with walls six feet high and a foot thick. Nothing is imported yet. The agent could not find a spot for it on a river bank near town, because every candidate was inside the town boundary or excluded, so the planner reported that rather than inventing one.

The animals that could not be downloaded

James mentioned that there were farmyard animal packs from Fab sitting unused. The agent went looking and the packs were not there. It searched the project content, the second drive and the downloads folder, and then the local Fab cache, which holds only the Game Animation Sample and a streetwear outfit. It said so and asked him which pack he meant, rather than guessing.

It also searched the web for free realistic rigged sheep and cows. The realistic ones are paid. The free ones are cartoon or low-poly, and the free listings have to be claimed on James's own account before they can be used. So the plan became building them. Sheep come from the petting zoo's existing Suffolk models. A cow went from nothing to a first build in Blender that afternoon, 1.40 metres at the withers and 3.06 long, with the coat carried as vertex colour so one mesh serves a Friesian and a Hereford. All of them are to be reshaped onto the deer's skeleton, so the grazing, chewing, resting and walking clips the doe already has will play on them.

That is the plan. No sheep has moved yet.

Every house, starting with one road

The second job was Bewsall, the big estate in the north-west. It has 2,986 homes in about 1,700 buildings on 93 streets, and the agent's first finding was a correction: the website's figures for houses and bins, which James had refreshed that morning, are for Radworth. Bewsall has no bins and no home a player can walk into. The goal James set is that every one of those houses can be entered, so that a player can follow a resident home and watch the routine.

The pilot is one road, Tenter Road, with 47 interwar semis. The agent ported the walk-in builder it had written for the steel-house estate and made seven variants of the house in three widths: 21 meshes, each with a hall, a stair of thirteen steps down the gable side, a front room and a back room through an arch, a kitchen with a back door, and upstairs a box room, landing, bathroom and two bedrooms. Brick cavity walls, real openings, clear glass, about five thousand triangles each. The audit passed all 21: every room reachable for the pathfinder's capsule, stair headroom of 2.24 metres, front door to back door in one go.

The reason for three widths and not one is a number rather than a taste. A resident's pathfinding agent is 35 centimetres wide, and any gap narrower than 70 does not exist as far as it is concerned. Stretch one house to fit every plot on the road and some doorways fall under that line, and the front door silently stops being a way in. With three buckets the stretch needed on Tenter Road is between 0.93 and 1.07, and the doorways hold. Every house is also placed 38 centimetres up, because the grass blades are 35 and would otherwise grow through the rooms.

Only the front and back doors are real doors on the pilot. The internal doorways are open, because the steel estate's 900 ticking internal doors were never measured for frame rate, and the pilot is where that number gets made.

A road at low evening sun with a white dashed centre line, red-brick gable walls and terraced houses on either side, a chimney against blue sky with cloud, and a green field and distant hill between the houses.
A road in low evening sun with red-brick gable walls, terraced houses and a green field between them.

This frame came out of the same afternoon's stills run and is here for the colour of the brick against the field. It is not Tenter Road.

An airport bus, drawn on a bent road

The third job was a number. Route 7 is the bus to the airport, and all the agent could do was the arithmetic. It ported the town's road-graph rebuild into Python so it could rebuild the same graph offline, checked that it matched the last live dump on every count, and then drove a bus round it in simulation. One lap is 11.17 kilometres and takes 24.1 minutes with no stops. A thirty-minute timetable rule says one bus is enough, so route 7 gets one bus every half hour with a layover of about five and a half minutes at the airport. The rota of drivers, already live for the two-bus plan, comes out at 72 bus-hours a week with nobody in the cab, better than either alternative on paper.

The routes already running, 4, 5 and 6, were re-run to check nothing had moved. Their outputs came back byte for byte the same.

The first bake of the route refused to run. The airport access road has a zig-zag in it about a hundred metres short of the terminal, and the bus-glide script will not accept a one-metre kink in a route line. The agent smoothed the bus line over the kink for route 7 only. The road itself is still wrong, and that belongs to the airport thread, so the agent left a note for it rather than reaching into someone else's asset.

Racers on for good, and a night of results

At 10:49 James had said to get the missed items working before the promo shoot. The racers, the lads and lasses in tuned cars who drive round town in the evenings, were switched on in the game settings for good rather than for a test, and the agent staged a minimum of three out every evening. On the week's actual rota the number is one on Monday and six on Saturday, which is the problem that rule fixes. Staged, not built.

The overnight runner got further than it had the night before. Two hundred and eighty-eight hair materials plus fifty-two were fixed. A build gap went green. Eighteen clips of the magic sequence were made. The racer cabin took its first stills and the notes that came back were the honest kind: the driver's hair groom floats about half a metre above the roof, the seatbelt sits behind her, and the cabin has no B-pillar. A pianist's twelve takes all failed their score. One resident failed because the director's body wears a different groom from the one it was tested with.

James was at the PC by evening and said to carry on through all of it.

Late on, the train got a plan too: residents boarding the placed train at the doors and taking real seats, so the player never sits on one. Staged as well.

The fault

Fenced fields leave parts of the map unreachable in Unreal Engine 5.8

A planner that lays a hedge round every field produces a legal layout in which one or more fields have no gate and no gap. A player or an NPC cannot enter, and a flood fill over the field graph never reaches them. The planner passed because it checked boundaries, not reachability.

The fix

Reachability as a failing check

Split boundaries per field pair, give every pair and every outer edge an opening (gate on roads and livestock fields, gap elsewhere), then flood-fill from the road and fail the whole plan if any field is unreached. Result: 24 of 24 reached, 61 gates, 45 gaps. Leave gate openings empty until the openable gate exists, so nothing is ever sealed in the meantime.

The fault

Walk-in house doorways under 0.70 m disappear from NPC pathfinding in Unreal Engine 5.8

The navmesh shrinks back from every wall by the agent radius, 35 cm here, so any gap narrower than twice that is not there. A house scaled sideways to fit a plot can fall under the line, and the front door stops being a way in with no error.

The fix

Width buckets instead of free scaling

Build each house at three widths (6.5, 5.6 and 4.8 m) and pick the nearest per plot. The residual X scale on the pilot road is 0.93 to 1.07 and doorways stay at or above 0.70 m. Place every walk-in 0.38 m up so grass blades of 35 cm do not grow through the floor.

The fault

Bus route spline with a zig-zag is refused by a 1 m smoothness gate

The airport access road's spline has a kink about 100 m short of the terminal. The glide-bake script refuses a bus line with a 1 m deviation and the first bake of route 7 failed.

The fix

Smooth the bus line, not the road

Smooth the route's own line across the kink for that route only, leave the road asset alone, and pass the note to the thread that owns it. All three existing routes re-ran byte-identical afterwards, which is the check that the change touched nothing else.

The kit

What was used

  • A planner in Python reading the road graph and the level survey, with a plan preview image checked by eye against the survey.
  • Blender in headless mode for the countryside kit and the 21 house meshes, with plan and eye-level renders of each.
  • An offline port of the town's road-graph rebuild, so a bus route could be simulated against the real graph with the editor shut.
  • A queue of staged jobs run in slots overnight, with a backup beside every file touched.

Plain English

TermWhat it means
navmeshAn invisible map of walkable ground that characters use to work out routes. No navmesh, no walking.
agent radiusHow wide the pathfinder assumes a walking character is. The navmesh is shrunk back from every wall by this much, so any gap narrower than twice the radius simply is not there as far as an NPC is concerned.
flood fillSpreading out step by step from a starting point to every place that can be reached from it, like water poured on a floor; anything the flood never touches cannot be reached.
collision hullThe invisible simplified shape used for bumping into things. It is not the shape you can see, which is why invisible walls happen.
splineA curved line placed in the level that other things follow - a road, a bus route, a river.
FBXThe interchange file format used to move models and animation between Blender and Unreal.
HISMOne object in the level that holds thousands of copies of the same model and draws them together. A street's worth of downpipes costs roughly what one downpipe costs. The hierarchical version also picks the right level of detail per copy.

Things we still need to fix tomorrow:

  • Fields: run the read-only survey in the level, re-make the plan from it, look at the preview, then place phase one.
  • Build the openable field gate and import the kit; the animals follow once the cow's skeleton export is done.
  • Tenter Road: bring the 21 meshes into the editor, place the pilot, then measure standalone frame rate before any other street.
  • Route 7: tell the airport thread about the kink; they set the row to one bus, a 30-minute headway.
  • Racers: the cabin notes (hair, belt, pillar) and the evening minimum are next.
  • Overnight: the longer session needs a fresh start before it reaches its ceiling.

← All devlog entries

Watch it get built. All of this goes up on YouTube as it happens - broken animations, buildings hovering a foot off the ground, the lot.

Subscribe on YouTube