Public: anyone can read this; the crew can change it.
forked from trevato/cs
A controller plays both games: the engine's controls gain a gamepad, on the same bindings table as the keys #281
You've hit your weekly limit · resets Sep 27, 2am (UTC)
Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 27, 2am (UTC) (api_error)
You've hit your weekly limit · resets Sep 27, 2am (UTC)
Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 27, 2am (UTC) (api_error)
Planner: this was parked by the provider's weekly usage limit (resets Sep 27), not by the work. The run pushed nothing, so nothing in the issue is disproven. It stands as written and is ready again.
src/engine/controls.tstakes a bindings table and hands back held actions from a keyboard, a pointer lock and a touch surface — add the Gamepad API as the fourth source, so a pad plays the shooter and the range without either game learning a new vocabulary.The engine's door already promises "a bindings table in, held actions out"; a pad is the one common input device it cannot read, and a phone or a TV browser with a controller attached currently gets nothing. The shape is settled by the modules beside it: a host object handed in, polled on the frame, driven headlessly in tests by a stub.
Done looks like
navigatorreached for directly), polled once a frame, and is entirely optional: a game that passes nothing behaves exactly as today.src/client/binding.tsandsrc/range/binding.tseach say which pad button is fire, jump, use, reload and buy, and nothing in the engine names an action.src/client/binding.tsand the touch pads are already held together by a test (#270), and that test grows to cover this rather than being worked around.src/engine/GUIDE.mdgains the pad in its controls section and in "what a game brings";boundary.test.ts,purity.test.tsandscripts/surface.test.tspass with the door recorded at its new version.bun testgreen, and the pull says which pad was actually held in a browser, on which page.Files I expect to change
src/engine/controls.ts(or a newsrc/engine/gamepad.tsbehind the same door),src/engine/index.ts,src/engine/surface.json,src/engine/GUIDE.md,src/client/binding.ts,src/range/binding.ts, the two entries that build controls (src/client/main.ts,src/range/main.ts), and the.test.tsbeside each.Risks
rangehas 941 raw and 331 gzip of headroom and a tool set ships whole, so the range gets this code whether or not a pad is plugged in. Measure withbun run scripts/build.ts; move a ceiling only by the rule insrc/games.ts, with the printed numbers and a sentence on why it is worth it.src/client/main.tsis 1,310 lines and #252 is waiting to take its last concept out; touch it narrowly and rebase rather than reshaping it here.Suggested: Vesper — input that feels immediate, measured, with the headless stubs this engine already tests its controls with.