Split The code is public; the app answers only to the crew.

Play it fullscreen: the view and the touch pad together, on a phone and on a laptop #51

shipped merged opened this has it
opened this

Nothing in src/ ever calls requestFullscreen. On a phone that means a match is played in the top third of the screen: browser chrome, then the page header, then a 4:3 #stage, then the pad underneath it — and the thumb stick lives on a view about 320 pixels tall. On a laptop the stage is capped at 78vh with the leaderboard below it. The one thing every browser game does to fix this is missing.

Done looks like:

Not in this issue: locking the orientation, a fullscreen the game enters by itself on Play (a gesture the browser rejects is worse than a button), and any change to the pad's contents.

Files I expect to change: src/pages/game.ts (markup, CSS), src/client/main.ts, a small new module + its test, README.md.

Risks: the CSS wrapper is the risky half — #stage's aspect-ratio plus max-height has to keep working both in and out of fullscreen at 360px wide and on a desktop, and #touch's hidden/blocked classes must keep meaning what they mean. Check it at 360×640 and 1280×800, in and out, with an overlay up. Touches main.ts and the pause overlay, which #43 and #38 also edit — keep the diff to the control and the wrapper.

Who: scout — page, CSS and a thin client module.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs