Split The code is public; the app answers only to the crew.
A whole match on a phone: fire while aiming, weapon switch, scoreboard and a way to leave #25
Check · Review · Land · Live done — Landed and live in production.
Pushed. bun test passes: 186 tests, 0 fail. --- Firing and aiming now happen at once with a second finger on the looking side of the canvas, not a button under the thumb.
shipped merged
Sign in to join this conversation.
new above
offline
Pushed.
bun testpasses: 186 tests, 0 fail.---
Firing and aiming now happen at once with a second finger on the looking side of the canvas, not a button under the thumb. A touch keeps the target it started on for its whole life, so the finger already dragging the view goes on steering while any further finger past the stick zone holds the trigger; the trigger finger's own movement is thrown away, since a twitch should not move the aim, and the last finger off the trigger is the one that releases it, so a phone cannot end with a stuck fire.
lookX/lookYstill accumulate in exactly two places (a locked mouse move, and a touch whose role islook) and are drained once a frame.The pad moved out from under the HUD to a deck below the view. At 360px the stage is 4:3 — about 328×246 CSS px — and the HUD owns all four corners of it (radar bottom-left, health under it, ammo bottom-right, kill feed top-right), so a button on the glass covers something you need. The deck is guns
1 rifle/2 pistol/3 knife, a heldscores,crouch jump use reload buy, amenubutton, and a full-width fire bar: two grid rows of five plus the bar, each cell 60.5×48px at 360px wide,auto-fitso it never overflows.setAction("menu")callsonPause, so the same#pauseoverlayEscapeopens — and Leave match — is reachable without pointer lock. While any overlay is up the pad goesvisibility:hiddenrather than out of the flow, so the leaderboard under it does not jump every freeze time.Two fixes fell out of the touch path and are worth a look. Aiming was gated on
controls.lockedinmain.ts, which a touch screen never gets, so a finger could not turn the view at all; the gate is gone and the phone build no longer asks for pointer lock. The buy overlay lives inside#stage, which istouch-action: none, so its list could not be scrolled with a thumb — overlays are nowtouch-action: pan-yand the buy panel has aClosebutton, since the pad is hidden while it is open.src/client/input.test.tsis new: it drives the real handlers against a fake canvas and document — a second touch firing while the first keeps steering, the trigger finger not steering, a cancelled or doubled trigger releasing exactly once, and the pad's action table (menu→onPausewithlockedfalse, slots →slotWanted,scoreboardheld,buy→onBuy). Aserver.test.tscase asserts everydata-actionthe pad promises is in the first paint and that the pad is rendered after#stage.What I checked, and what I could not: the layout numbers above are computed from the CSS and the HUD's own anchors (
radarSize = 360 × scale,pad = max(12, width × 0.02)), the page answers/in 1.6 ms locally, and the whole suite passes — but there is no browser in this sandbox, so I have no fps reading with the pad up and no screenshot at 360×640. That measurement has to come off the preview; the loop itself is untouched and the pad adds eleven DOM buttons and no per-frame work. Left out deliberately: tap-to-fire on the aiming finger (too easy to fire by accident while dragging; the fire bar covers one-thumb play and cycling spectators while dead), and the#fpsreadout still overlaps the ammo text in the bottom-right corner, which it did before this change.🤖 Generated with Claude Code
Closes #20