Commit Graph

44 Commits

Author SHA1 Message Date
JonShard 428f00a812 Ignore .log 2026-07-25 21:49:19 +02:00
JonShard 773cf647d8 Add invisible walls 2026-07-25 21:48:58 +02:00
algodoogle f6ac103233 Fix join-floor fall-through, grab race, drop physics, and remote hand sync
Four bugs from real cross-network play:

- Player/net_player.gd: the per-peer spawn-spread offset (added to avoid
  stacking joiners on top of each other) could push a joining client up
  to 12 units from center, but the floor is only 15x15 (~7.5 unit
  half-extent) — landing a client off the edge. Bounded to ~2.7 units.

- Player/net_player.gd: the glove scenes used for remote-hand visuals
  carry hand.gd (XRToolsHand), whose root node sets top_level = true and
  repositions itself to its parent's transform every physics frame,
  expecting to be parented under a live XRController3D. Parented under
  the plain avatar node instead, it fought both the local transform copy
  and the replicated sync every tick — whichever wrote last that frame
  won, which read as hands stuck near origin except momentarily. Disabled
  physics processing on those nodes; nothing else in the script matters
  without a real controller ancestor.

- Net/net_pickable.gd: grabbing an item sends an RPC to the server to
  confirm authority, but the item's regular state sync travels on a
  different channel with no ordering guarantee against that RPC. A
  stale "still loose" sync packet could arrive after an optimistic local
  grab but before the confirmation, and was being treated as a real
  authority loss, force-dropping the item — explaining "first attempt
  fails, second succeeds". Now a sync update can't yank an item out of
  our own hand mid-grab; only an explicit rejection or an actual loss of
  authority can.

- Net/net_pickable.gd: the non-authority path zeroes collision_mask and
  forces freeze_mode to KINEMATIC, but nothing ever restored either when
  a peer regained authority (e.g. the server after a client's release) —
  so a released item stayed collision-less forever, looking physics-less.
  Now both are restored from the item's own baked values whenever a peer
  owns a loose (not actively held) item again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 20:16:29 +01:00
algodoogle 17d20440da Fix catastrophic player spawn-offset overflow for real peer ids
The per-peer spread offset used the raw ENet peer id directly
((peer_id - 1) * 1.5), assuming ids are small sequential numbers. Real
peer ids are large effectively-random 32-bit values, so a joining
client's XR rig was being shifted by hundreds of millions of units off
the origin — the world had actually replicated correctly, the player
was just teleported far away from all of it, with float precision bad
enough at that range to jitter the view and destabilize physics.

Bound the offset to a small deterministic slot instead; the host still
keeps its original baked spot.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 19:59:36 +01:00
JonShard a9ca11fd17 Merge branch 'multi2' of https://git.offcoursegames.com/JonShard/VRyHungry1 into multi2 2026-07-25 20:48:39 +02:00
JonShard 13567e5dd3 Add global key events to close game 2026-07-25 20:48:36 +02:00
algodoogle 4ca0a05d1b Fix world population race and add multiplayer diagnostics
The world was populated before NetworkManager.world_ready() actually
called host()/join(), so owns_world() read true for every peer
(including a joining client) and each one built its own local,
unreplicated copy instead of the client receiving the server's spawn
through the MultiplayerSpawner. Population now happens after the
session is actually established.

Also adds net-log coverage for spawn/despawn, station gating, item
authority handoff, station snapping, avatar spawn/despawn, and scene
transitions, so multiplayer behavior is visible in
%TEMP%\vryhungry_net_<pid>.log instead of failing silently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 19:42:49 +01:00
algodoogle 596d777fae asd 2026-07-25 19:26:43 +01:00
algodoogle f7024db98d added multi 2026-07-25 18:20:12 +01:00
JonShard 265dd12b37 Add Table 2026-07-25 18:18:17 +02:00
JonShard a1cb484ca5 Add Table picks an order 2026-07-22 15:15:30 +02:00
JonShard ab6cce3d9a Add table with finite state machine 2026-07-20 13:43:18 +02:00
JonShard b6372c532a Improve look of stations 2026-07-20 09:37:06 +02:00
JonShard fc2c854305 Kanban 2026-07-19 11:15:35 +02:00
JonShard bd2ee722df Support multiple cooking recipes for same item 2026-07-19 10:48:41 +02:00
JonShard a48611c0ff Refactor hob to use Recipemanager 2026-07-19 10:48:22 +02:00
JonShard f0e3ba705d Load chopping, rolling and augmenting recipes from YAML 2026-07-19 10:48:21 +02:00
JonShard 714d813344 Reafactoring Recipemanager 2026-07-19 10:48:21 +02:00
JonShard 847af48394 Clean up what the AI did 2026-07-19 10:48:21 +02:00
JonShard 4d06e72bc1 Add Recipemanager that loads recipes from YAML 2026-07-19 10:47:28 +02:00
JonShard 840908e9ff Add Dirty plates and sink. Dirty plates don't accept food 2026-07-17 11:52:21 +02:00
JonShard b0fd26f3da Kanban 2026-07-16 18:22:11 +02:00
algodoogle 5e0b58a984 add kanban 2026-07-16 15:52:34 +01:00
JonShard 329bb1f984 Add plates accept MEALS and SIDES 2026-07-16 16:28:57 +02:00
JonShard e27ddfe3f1 Reorganize project into folder structure 2026-07-16 15:09:12 +02:00
JonShard 4b8e017d64 Fix circular dependency in combinable_item scene 2026-07-16 14:31:51 +02:00
JonShard 5e6b403a43 Add Container detects platable items 2026-07-16 12:07:32 +02:00
JonShard 3f1b9aea38 Add notes in TODO.md 2026-07-15 12:45:10 +02:00
JonShard 885c6f49f0 Add hamburger and refactor CookableItem and CombinableItem into scenes 2026-07-15 11:14:23 +02:00
JonShard 485ca899ab Add cooked_burger and change recipe chain 2026-07-15 10:14:45 +02:00
algodoogle 57ddfb0355 Merge branch 'master' of https://git.offcoursegames.com/JonShard/VRyHungry1 2026-07-14 19:20:16 +01:00
algodoogle f162578c3b plate 2026-07-14 19:19:48 +01:00
JonShard 9c55853930 Add Item dispenser that will dispense burger buns 2026-07-14 19:57:29 +02:00
JonShard f106d1a6ff Fix positioning of BurgerBuns 2026-07-14 19:25:54 +02:00
JonShard d770195b78 Merge branch 'master' of https://git.offcoursegames.com/JonShard/VRyHungry1 2026-07-14 19:20:21 +02:00
JonShard 7ee267e6ac Add burger buns 2026-07-14 19:20:17 +02:00
algodoogle b0b9d16b74 burger 2026-07-14 18:17:43 +01:00
algodoogle 1454303a80 Combinable Items 2026-07-14 17:47:47 +01: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 852762e746 Move Hob and Counter into scenes 2026-07-14 15:55:18 +02:00
JonShard 32f4b92983 Add logic to convert item to other 2026-07-14 15:38:01 +02:00
JonShard 6dbade14a2 Add Cube grab points 2026-07-14 13:36:33 +02:00
JonShard f101648080 Initial commit - pickup object 2026-07-14 12:51:57 +02:00