From 8d84373f549f2f61578a845e4dbf38c390b19681 Mon Sep 17 00:00:00 2001 From: Forrest Date: Mon, 5 Oct 2026 15:51:45 -0400 Subject: [PATCH] Task #10 follow-up: bump co-op PROTOCOL for the avatar snapshot change _put_avatar/_read_avatar's per-avatar record changed (one more time field, two int32s, for the upgrade channel's target/progress), so an older partner needs the hello/refused handshake to catch the mismatch and refuse cleanly, rather than misparsing snapshots. Co-Authored-By: Claude Sonnet 5 --- game/scripts/coop_session.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/game/scripts/coop_session.gd b/game/scripts/coop_session.gd index a1b99e5..0352b09 100644 --- a/game/scripts/coop_session.gd +++ b/game/scripts/coop_session.gd @@ -42,8 +42,10 @@ signal ended(reason: String) ## Partner: the first full state arrived; the game is on. signal welcomed -## The wire format: both machines must speak the same one (hello and welcome carry it). -const PROTOCOL := 2 +## The wire format: both machines must speak the same one (hello and welcome carry it). 3: #10 +## added a time field and two int32s (the upgrade target/progress) to _put_avatar/_read_avatar's +## per-avatar snapshot record. +const PROTOCOL := 3 const SNAP_EVERY := 4 # physics ticks: 15 Hz const INPUT_EVERY := 3 # 20 Hz, when it changed ## Seconds: the partner's input goes out at least this often, changed or not.