Commit Graph

12 Commits

Author SHA1 Message Date
algodoogle 61d92052ac Rebuild multiplayer on the stock spawner and synchronizer
Adding an object to the game no longer requires any networking code. The
MultiplayerSpawner runs in its default mode — no spawn_function, no payload
dictionary — and NetReplication builds each object's SceneReplicationConfig
from a convention, so scenes carry no hand-authored replication at all.

Every replicated node gets two generated synchronizers: NetSync for script
state, always server-owned, and NetXform for position, handed to whoever is
holding the object. That split is what makes grab prediction work — a
synchronizer never applies inbound state on the peer that owns it, so a
player's own hand drives an object with no round trip while is_dirty and
friends keep flowing one way from the server.

Interaction is now two RPCs for the whole game (NetGrab), and client gating is
one rule applied to every object (NetWorld). Deleted: net_pickable.gd, the
replicated net_held_by field and its held-state juggling, the
grant/reject/force-release negotiation, the static-item despawn RPC, and the
per-scene replication configs. Authority is the single source of truth for who
simulates an object.

Two things the convention had to learn, both found by the test suite:

  * Addon scripts are excluded. godot-xr-tools' snap zones and pickables expose
    a public `enabled`, which is exactly the flag each peer must set for itself
    — so replicating it meant the server sent `enabled = true` back over every
    client's gate, and stations went on grabbing objects out of the local
    player's hands.
  * Arrays of nodes are excluded. Array[Node3D] and Array[FoodItem] would
    otherwise try to serialise live node references.

table.gd's replicated state loses its underscore prefix, which now marks a
variable as private and unreplicated; two in-place array mutations there were
skipping their setters, and the progress bar could divide by zero on a client.

Suite: 146/146 passing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 22:04:22 +01:00
algodoogle c758771a75 gameover 2026-07-27 13:47:50 +01:00
JonShard 71d01e5be1 Add game export preset 2026-07-25 22:09:46 +02:00
JonShard 13567e5dd3 Add global key events to close game 2026-07-25 20:48:36 +02:00
algodoogle f7024db98d added multi 2026-07-25 18:20:12 +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 5e6b403a43 Add Container detects platable items 2026-07-16 12:07:32 +02:00
algodoogle 8845a519c5 fix hob 2026-07-14 16:42:27 +01:00
algodoogle 295f9802bf added some stuff
added some stuff
2026-07-14 16:05:12 +01:00
JonShard 32f4b92983 Add logic to convert item to other 2026-07-14 15:38:01 +02:00
JonShard f101648080 Initial commit - pickup object 2026-07-14 12:51:57 +02:00