From bcf4bcdac32f48901713341fba3b1848d1f3aec9 Mon Sep 17 00:00:00 2001 From: Veton Shabani <68129513+vetonshabani0@users.noreply.github.com> Date: Fri, 24 Jul 2026 11:31:57 +0200 Subject: [PATCH] Restore Yardline RC phone-controller bridge MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 2026-07-23 deduped-Babylon rebuild (#27) fixed the missing cars but was built from a source tree without the console embed bridge, so the phone fell back to a d-pad and no input reached the car — the map and cars render but the game is undrivable from a phone. Restore the bridge without a rebuild (source lives in Artan0/razing, not here), matching how BUILD.md already hand-patches this vendored bundle: - index.html: inline bridge script that declares the phone pad per race phase (sc:controls), feeds sc:analog frames into the car, and routes sc:intent buttons (reset/powerup/pause, menu nav, results screen) — mirroring the original in-bundle bridge. - assets/index-CSoa7UUc.js: expose the two runtime instances the bridge drives (window.__scInput = input controller, window.__scRace = race state machine). - BUILD.md: document the patch and a post-rebuild check so it can't silently regress again. --- yardline-rc/BUILD.md | 19 +++++++ yardline-rc/assets/index-CSoa7UUc.js | 2 +- yardline-rc/index.html | 81 ++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 1 deletion(-) diff --git a/yardline-rc/BUILD.md b/yardline-rc/BUILD.md index 16ae5ca8..49ecee47 100644 --- a/yardline-rc/BUILD.md +++ b/yardline-rc/BUILD.md @@ -33,6 +33,25 @@ with `import.meta.env.BASE_URL` (or a relative base) so a rebuild stays correct. After ANY rebuild, verify no `` `/assets/ `` remain: `grep -c '`/assets/' assets/index-*.js` must be 0. +**Phone-controller bridge (patched 2026-07-24):** the source builds embed a +bridge that (a) tells the console shell which phone pad to show per race phase +via `postMessage({type:"sc:controls", …})` and (b) receives the phone's +`sc:analog` driving frames + `sc:intent` button presses back. The 2026-07-23 +deduped rebuild came from a source tree WITHOUT that bridge, so the phone fell +back to a d-pad and no input reached the car — the cars rendered but were +undrivable from a phone. Restored here without a rebuild: +- `index.html` carries an inline `