NOTES FROM THE ROAD
THEJOURNAL
Build notes, measurements, and design decisions from behind the traffic simulation.
A junction is more than asphalt
Sidewalks, verges and medians are now part of the road cross section. Making them meet at a junction meant matching different slot lists, tapering missing pieces, and knowing when a strip should stop.
A lane change needs room
The lane graph could say that two lanes were connected. Teaching a car to move between them meant giving that connection a shape, checking the gap, and finding out that some roads had no room for it.
A road can change halfway along
Roads in the editor can now gain and lose lanes, carry bus and truck lanes, and decide their own markings. Making that work exposed how many different things a painted line can mean.
Who makes the triangles
I moved road rendering out of the simulation and into Unreal. That exposed a less obvious problem: the road you see and the road you drive on should not be the same mesh.
Leaving the sandbox
Running traffic inside Unreal starts with one ownership decision: physics controls the car's position, while DrivEngine reads that position and returns steering, throttle and brake.
A town from a seed
One seed produces the street graph, road hierarchy and hills. The generator is useful less for pretty towns than for awkward road layouts that expose bugs in the tools.
How you measure a town
A traffic simulation has no single score. DrivEngine tracks clear rules, compares them with the last accepted run and repeats each measurement across sixteen random seeds.
The car brakes too hard, and it was not the brakes
Hard braking looked like a pedal problem. It was mostly caused by late junction decisions, one real controller bug and a test that blamed bends for waits they did not cause.
Moving the claim onto the junction
A driver cannot remember the state of a shared crossing for everyone else. Moving admission to the junction cut collision episodes by roughly a third, at a cost of four to five percent of throughput.
Who goes first, and the promise only one driver could read
Two drivers can agree about a crossing on an empty road and disagree once traffic builds up. Three attempted fixes failed because their shared promise lived in only one driver's view.
Three tiers of a driver
Each car plans a route, chooses a speed and steering target, then works the controls. Keeping those jobs separate makes the driver easier to test and debug.
A junction is a decision, not a crossroad
Four roads meeting at one point do not say which turns are allowed. The junction bake builds those movements, rejects turns a car cannot follow and reports what disappeared.
Two layers: the road you edit and the lanes cars drive
DrivEngine stores an editable road and builds the detailed lanes that cars use from it. The split keeps authoring simple and moves expensive checks out of the driving loop.
What DrivEngine actually is
Most game traffic follows a recorded path. DrivEngine gives each car a driver instead. This is an overview of how roads become lanes, decisions and movement.