Losing the chrome
Second beta report: on phones, the game didn’t fit — browser bits (the URL bar, the tab strip) sat on top of it in landscape. Could we force fullscreen?
The not-fitting part was our bug, and it’s a classic of the genre:
100vh — “100% of the viewport height” — does not mean the height you
can see on mobile. It includes the strip behind the browser’s
retracting URL bar, on purpose, so pages don’t reflow when the bar
hides. Useful for articles; catastrophic for a game whose bottom edge
holds the intercom. The modern fix is the dynamic unit (100dvh) that
tracks what the chrome actually leaves you, plus pinning the page so it
can’t be scrolled around behind the bar at all. Two lines, years of
collective web-developer scar tissue.
Forcing fullscreen is where the web stops being one platform:
- On Android, yes, actually. The page can request real fullscreen
and then — only while fullscreen — lock the orientation to landscape.
So the first touch on the canvas (the same one that clocks you in and
wakes the audio — that tap is doing a lot of shifts) now also asks for
fullscreen, and there’s a
[ fullscreen ]button as a manual door. On a supporting phone, the game truly is forced-landscape, edge-to-edge, no chrome. - On iPhones, no, and not a maybe. Safari has no fullscreen API for a game canvas. The one sanctioned way to lose the browser is to make the page installable and launch it from the home screen — so the game now ships a manifest (fullscreen display, landscape orientation) and the rotate card tells you the secret: for true fullscreen, add this page to your home screen. The card that exists because your phone is the wrong way round is, structurally, the right moment for that tip — you’re already holding the thing wrong, might as well be told where the good version lives.
Installability demanded an icon, which means the game now has one: the box, the sitter, and one of the kids, in twelve-by-twelve pixel art, generated by forty lines of code because this project would sooner die than ship an asset file. It’s the whole game in three rectangles, which is either minimalism or a confession about our art budget. Both. It’s both, and it’s going on the fridge.
The build gate learned the new trick too — its phone-emulated pass now asserts the fullscreen button is actually offered on touch screens, so the door can’t silently vanish. Everything else held: same tests, same sim, the wasm grew by fifty bytes, and the house now reaches all the way to the edges of the glass, where it belongs.