Restore Yardline RC phone-controller bridge - #30
Merged
Conversation
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.
Contributor
|
🚀 Preview for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since the 2026-07-23 deduped-Babylon rebuild (#27) that fixed the missing cars, Yardline RC is undrivable from a phone. The map and cars render and it plays with a keyboard, but the mobile controller does nothing.
Root cause: that rebuild came from a game-source tree without the console embed bridge.
sc:analog/analogappears 0 times in the current bundle (present in every build through #26). Losing the bridge broke input two ways:sc:controls), so the phone falls back to a d-pad instead of the steering wheel + gas/brake.sc:analogdriving frames orsc:intentbuttons, so no input reaches the car.The launcher and controller apps are unchanged and fine — only the game lost its listener.
Fix
The game's real source lives in a separate repo (
Artan0/razing) that isn't available here, so — consistent with howBUILD.mdalready hand-patches this vendored bundle — the bridge is restored without a rebuild:index.html— inline bridge<script>that mirrors the original: declaressc:controlsper race phase, feedssc:analogframes into the car (setTouchDrive/Brake/Handbrake), and routessc:intentbuttons (reset / powerup / pause, menu nav, results screen).assets/index-CSoa7UUc.js— two tiny, unique-anchored injections expose the surviving runtime instances the bridge drives:window.__scInput(input controller) andwindow.__scRace(race state machine).BUILD.md— documents the patch + a post-rebuild check so it can't silently regress again.Verification
node --check; BUILD.md's`/assets/invariant stays 0; single entry chunk preserved.yardline-rc/**and the stamper copies it verbatim (NO_STAMP), so the patch flows to gh-pages unchanged.Proper long-term fix
Restore the embed bridge in
Artan0/razingand rebuild, then drop the inline shim.