Commit Graph

16 Commits

Author SHA1 Message Date
JonShard 5ced240c43 Notes 2026-08-11 18:12:39 +02:00
JonShard 9ea7a045f4 Sync SnapZone picked_up_ranged 2026-08-11 15:12:09 +02:00
JonShard 6a591b9e3a Add bought station is ghost when spawns 2026-08-11 13:24:51 +02:00
JonShard 4bfb72d749 Improve logging 2026-08-11 11:02:20 +02:00
JonShard 3ae1e089aa Clean up SweetLogger prints by making file and functions arguments automatic 2026-08-11 10:19:26 +02:00
JonShard bd43b0bd1e Add a const in SweetLogger to toggle debug prints 2026-08-10 14:36:27 +02:00
JonShard 7648ecbac9 Add Sweetlogger 2026-08-10 13:47:01 +02:00
JonShard 9cdf72dc47 Add MultiplayerSyncronizers to stations 2026-08-09 13:15:30 +02:00
JonShard 48c9845624 Add Table handles Sides 2026-07-31 14:03:53 +02:00
JonShard 8b6f444d55 Fix XRTools library bug that didn't nil check in pickup 2026-07-28 19:16:35 +02:00
algodoogle c758771a75 gameover 2026-07-27 13:47:50 +01:00
algodoogle ae3e7ec674 jiff 2026-07-26 13:49:46 +01:00
algodoogle 23ec41c1d6 Fix five multiplayer sync bugs, add automated two-instance test
Adds test/multiPlayerTest.tscn plus a driver that runs the kitchen flow
across two game instances: grab/drop, dirt station, sink washing, hob
cooking, counter combining and plating. Runs headless (run_mp_test.ps1),
in two visible windows (run_mp_test_windowed.ps1), or by hand with
keyboard controls (play_mp_test.ps1). 108 checks, exits non-zero on
failure.

After every step both peers snapshot every item's position and rendered
state and the server diffs them. Targeted assertions only look at the
thing a step touched, which misses desyncs elsewhere - that audit is
what caught the last bug below.

Bugs found and fixed:

- net_pickable: apply_held_state() only wrote `enabled` in its
  non-authority branch, so once a client grabbed an item every other
  peer set enabled=false and regaining authority never restored it. The
  server could then never pick that item up again, and a station would
  "snap" it (emitting has_picked_up, so a plate still got marked dirty)
  while pick_up() bailed out on the disabled item - leaving the zone
  holding an item with no grab driver.

- network_manager: station gating only happened in the spawn path, so
  stations baked into a scene file kept running their snap zones on
  clients and grabbed items straight out of the local hand. Added
  gate_existing_stations().

- network_manager: despawn_item() only freed the server's copy. Items
  baked into a scene aren't tracked by the MultiplayerSpawner, so
  consuming one left a ghost on every client, which then blocked the
  station it sat in and got grabbed instead of its replacement.

- network_manager: the snap-into-station decision read the server's own
  copy of the item position, but the reliable release RPC routinely
  overtakes the synchronizer's unordered position updates - so it acted
  on a stale position and teleported items back into the station they
  had just been carried away from. The releasing peer now sends its
  final transform and the server adopts it first.

- container: contained_ids.append()/erase() mutate the array in place,
  which never fires the setter that rebuilds the plate's visuals. The
  peer that put food on a plate was the only peer that never redrew it;
  remote peers looked right because the synchronizer assigns there.

Also null-guards XRServer.get_tracker() in the vendored xr-tools hand
grab point, which threw on every successful grab without an XR runtime,
and adds multiplayer_world.populate_from_layout so debug scenes can bake
their own content instead of spawning the whole kitchen.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 02:00:50 +01:00
JonShard 4d06e72bc1 Add Recipemanager that loads recipes from YAML 2026-07-19 10:47:28 +02:00
algodoogle 5e0b58a984 add kanban 2026-07-16 15:52:34 +01:00
JonShard f101648080 Initial commit - pickup object 2026-07-14 12:51:57 +02:00