From 22ed4a7a520ea09b346649d55ed634fce669249d Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Fri, 24 Apr 2026 14:07:08 -0700 Subject: [PATCH] udp client: register arena:snap + squash:move geckos listeners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Server-emitted arena:snap packets over UDP were being dropped silently because lib/udp.mjs only listened for tv, fairy:point, and 1v1:move. The server's "prefer UDP, fall back to WS" path sees the emit succeed and never falls back, so arena clients never received snapshots — other players appeared frozen / absent. Same latent bug for squash:move; adding both for consistency. Co-Authored-By: Claude Opus 4.7 (1M context) --- system/public/aesthetic.computer/lib/udp.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system/public/aesthetic.computer/lib/udp.mjs b/system/public/aesthetic.computer/lib/udp.mjs index 761773208a..6bc7280e61 100644 --- a/system/public/aesthetic.computer/lib/udp.mjs +++ b/system/public/aesthetic.computer/lib/udp.mjs @@ -136,6 +136,16 @@ function connect(port = 8889, url = undefined, send, explicitTurnHost = null) { channel.on("1v1:move", (content) => { respond("1v1:move", content); }); + + // 🏟️ Arena snapshots (server-authoritative broadcast at 30Hz) + channel.on("arena:snap", (content) => { + respond("arena:snap", content); + }); + + // 🎾 Squash position updates (peer-relayed) + channel.on("squash:move", (content) => { + respond("squash:move", content); + }); }); channel.onDisconnect((error) => { -- 2.51.2