Get notified

Dev Log  · 

The trees told the navmesh they had moved

The owner’s fifth tape of the night was 53 minutes with a returning tester, to day 12, and the note after it was the one every engineer dreads: “lag started early… further down the line became real bad, need full investigation”. His guess was the pathfinding, the one big system added lately. Two experiments said no – navmesh on and off ran the same, the HUD on and off ran the same – and five timers around the game’s own systems explained five milliseconds of a forty-five millisecond frame. So the engine was asked to name the function itself: a profiler dump on a slow wave frame. Eight of nineteen milliseconds were the navigation mesh regenerating tiles in the middle of a wave, on the game thread.

The mesh had been keeping a census all along – every five seconds, which navigation-relevant thing had moved – and it had been writing the same name into the log for a week: a tree. When a woodcutter chops, the tree shakes; the trunk that carries the tree’s collision hung under the shaking part, and a moving obstacle dirties its tile every frame it moves. Every axe blow was a navmesh rebuild. In the owner’s own log a tree was moving in 121 of 170 samples. The stone nodes did the same thing under the pick. The “navmesh off” experiment had never switched the navmesh off at all – the lesson of this project, learned again: verify a switch by what it caused, not by the command line.

The fix is one line each: the trunk and the boulder hang off the root, the shake moves only the look; geometry for a dirty tile is gathered on a worker thread now, not the game thread. The same scene, before and after: waves at a 1% low of 26 fps with 253 hitches became a 1% low of 111 fps with none. The wheel turns the building ghost now as well, since the same tape asked for it.

The roof came next, a complaint three tapes old: “you should be standing on top, not inside”. A new test dropped the player on a house ridge and read the numbers instead of the picture: he stood at 310 centimetres, the top of a hidden collision box, inside the thatch. The visible house had never collided at all. The engine had been saying so in its log at every spawn – a runtime-built mesh needs its vertex data kept on the CPU for the collision cook, and it was not. One flag later the same test reads 480, the ridge, and a slightly kinder floor angle lets him walk the 46-degree slope he used to slide off. The test stays as a gate, so the roof cannot quietly go back to being a picture.

The owner’s word in the morning set the next piece of work: the authored village well replaces the placeholder (done the same hour), and the build itself should look like the game – pick a house and the ghost is the house, place it and the house stands, and while it is built its texture fills from the ground up to the roof. That is the next session.

Recruitment

Get the next entry by email

One email when the Steam page opens, one when there is something playable. Nothing else.