Moondog, day 3 (17 Oct): six wrong guesses and a slope that was too steep
28 commits. The movement work finally reached the point where other people could test it, and that changed what I needed to build.
The slope jitter was never in reconciliation
Walking up slopes still jittered, and switching correction off with F1 made it vanish. So I spent a while assuming correction was the problem. First I bounded how far one frame of correction can move you, which helped. The real cause was simpler: Terrain3D's collision is faceted, so the face a capsule actually touches can be much steeper than the hill looks. The floor angle limit was below what the terrain had in places, so the body kept being told it wasn't on the floor. I raised FloorMaxAngle to 60 degrees and the jitter was gone. That was after six wrong hypotheses.
Is the simulation deterministic?
Before deciding whether to build input replay, I needed to know if the server's simulation is reproducible at all. I built a server-side harness that records a session's inputs and replays them as many times as I like in one process. Answer: it's bit-for-bit reproducible. The harness also found a spawn bug, my own regression: a fast path I'd added put new characters 0.9 m inside the terrain.
Getting captures from testers
Other people started playtesting, and "it feels wrong" doesn't tell me much. So now:
- F3 opens a box where a tester types what they noticed, and the last stretch of movement telemetry is uploaded to the server along with the note.
- The first version of this never worked. The handler looked up a node path that doesn't exist, and a null check quietly swallowed the keypress. Another fix: a typed note could just disappear. Every silent exit in that path now says something on screen.
- The first real capture said "Lots of rubber banding", 63 seconds of play and no position. I couldn't do anything with it. Captures now record where you are, and the tester can see their coordinates and how far off they are, so we can talk about specific spots.
The rubber banding
Replaying the route from that capture led somewhere I didn't expect. The server reported 113 terrain regions while the client had 223. The two had different copies of the map, and nothing logged a warning about it. Where they differed, the server's ground was in a different place, so of course the player rubber-banded. The server now mounts the same terrain source the client uses.
Also
- Database work (polling, heartbeats, saves, login) moved off the main thread, with each job opening its own connection.
- The state broadcast went to 30 Hz instead of every physics tick. The simulation still runs at 60. This halves the packets.
- The dev server now runs from source, so changing one line of server code no longer means rebuilding a whole image.