Moondog, day 4 (18 Oct): the first thing in the world that isn't a player

23 commits. The morning closed out the rubber-banding hunt, and the afternoon finally started on the game itself.

The stutter was a stall, not latency

I built a harness to reproduce a tester's network link locally, expecting to tune lag compensation against it. It disproved that idea right away: latency isn't what makes movement stutter. The server occasionally stops for a moment, and every client then snaps. Lag compensation would have made that worse, not better.

So I measured gaps between server ticks against the time the work inside them took, and found that time was passing while the process wasn't running at all. It was being paused from outside, by the machine it was running on. The same code on another machine showed no stalls. I can't fix that from inside the game, so I wrote it down properly: what to re-measure once the server moves, and how to judge the numbers. The server log now warns when it sees it.

A four-client run with ten throwaway test accounts showed the stalls hit each connection separately, which fits.

Interaction

The first interactive objects: five boxes that change colour when someone asks the server to. Then:

  • E (or Square/X on a pad) interacts, as a normal rebindable action rather than a debug key.
  • You can't claim a character someone else is already playing. The second session is refused, and the player is told why.
  • Escape opens a small menu (Resume, Settings, Quit). It doesn't pause the game, since it's an MMO.
  • Gameplay input stops while a menu is open. Escape and the F-keys are reserved, and bindings are split by keyboard/mouse and controller.

Gathering and inventory

By evening the boxes had become gathering nodes:

  • Inventory and depletion tables in the database, with an item catalogue.
  • Inventory goes over a private channel to one player. The world state packet is identical for everyone, so putting a bag in it would show one player's things to all of them.
  • The server decides what an interaction does and checks where you actually are before handing anything over.
  • A character panel so you can see what you've gathered, and a node that has been gathered now looks gathered. Before this, the server credited you but never changed the node, so it looked like nothing had happened.