Your repo
Screens, phones and TVs
The same build is played on a handheld, a 4K TV, an ultrawide, a tablet and a phone. How to fill every one, lay a game out for phones, and earn the TV label.
Fill every screen
The same build is played on a handheld (16:10), a TV or monitor (16:9, often 4K, including a docked Deck or a PC in Big Picture), an ultrawide (21:9), a laptop (3:2), a tablet (4:3 to 3:2) and, for web builds, a phone.
- Let the view grow to the screen’s shape, instead of drawing a fixed frame with black bars around it. Put the HUD on the real edges and centre the menus.
- A bigger screen may show more of the world, never change the game. Keep spawns, rooms and boards the size they are on the handheld, so a wide screen isn’t easier.
- Design for 1280×800 first. That is the Steam Deck, and the space the runtime files scale from.
| Engine | How to fill the screen |
|---|---|
| Godot | Stretch aspect expand |
| Unity | A Canvas Scaler matching height, and a camera that keeps its vertical size |
| Runtime files | fitCanvas(canvas, { w: 1280, h: 800, fill: true }), as the starter does |
| Your own canvas | Size the canvas to the window on resize, and lay out from its real width and height |
A game that letterboxes still passes the check; it notes (⚠) the bars it sees on a 16:9 screen, and a game with bars doesn’t earn the TV label.
Phones
The PushPlay app plays web builds on phones and tablets. A game earns the Phone label when it is laid out for a phone, plays with touch alone, and says so:
"inputs": ["gamepad", "keyboard", "touch"],
"phone": { "orientation": "portrait" }
orientation is portrait, landscape, or any for a game that lays itself out both ways. The app turns the game for you: don’t write your own orientation lock. A game that keeps a landscape handheld layout earns Tablet instead. A party game doesn’t earn Phone, because a phone joins one as a controller.
What a phone layout needs:
- A phone-shaped space. Portrait 720×1280 for one-thumb games (tappers, stackers, runners, puzzles, cards); landscape 1280×720 for two thumbs with a stick and buttons. Treat that as the minimum and let the view grow to the phone’s real shape.
- Text of at least 32 px in that space (40 reads comfortably), and headings from 44 px.
- Tap targets of at least 56 px, and on-screen buttons of at least 64 px, 24 px apart.
- Safe areas. Nothing the player reads or taps goes under the notch or the home indicator: keep the HUD 32 px inside
env(safe-area-inset-*). - Thumb zones. Everything pressed during play sits where thumbs rest: the bottom third in portrait, the lower two-thirds of each side in landscape. The HUD goes at the top and is read-only, except the pause button in a top corner.
- Touch alone. No hover, right-click or keyboard. Every menu a player can leave has a visible Back.
- Pause when hidden. A call or the lock button hides the page at any moment (
visibilitychange): pause and save, and never resume by yourself. - A controller still works. With a Bluetooth controller, a phone should play like a handheld: hide the on-screen controls while it’s in use.
For a game on the runtime files, the check plays it with touch only at 390×844 (or 844×390) at 3× pixels: menus by tap, the pause button, pausing when hidden, and no text under 32 px.
npx github:Visual-Zone-Development/pushplay-kit new-game my-game --phone portrait
npx github:Visual-Zone-Development/pushplay-kit dev --host
The first starts a game already laid out for a phone; the second serves it on your Wi-Fi so you can try it on a real one.
TVs
The PushPlay app runs on Android TV and Google TV. A game plays on a TV when it has earned the TV label and the TV has one of its controls: phones, or a controller once one is paired.
The label is earned in the check’s TV pass, which every web build gets after passing everything else. It’s the one part of the check that never fails a build: a game that doesn’t earn TV is published as usual and plays everywhere else; it just isn’t listed for TVs. The check prints TV label: earned, or not earned with the reasons.
The pass opens the game the way the app shows it on a 1080p TV: 960×540 CSS pixels at 2×, with window.pushplay.device set to { kind: 'tv', performance: 'low' }. Five things must hold:
- It plays with what a TV has.
inputsincludesgamepad, or the game is played with phones. And the remote alone gets it going: Enter (the remote’s OK) on the title starts play, or shows the screen asking for a controller or phones. - Back opens its menu. The remote’s Back opens the app’s menu over the game and pauses it (
onPauseandpushplay:pause). The game must open its own pause menu then, not keep playing behind. - It reads from the sofa. No bars, and no text on the canvas smaller than 15 px in an 800-tall space (20 pixels on a 1080p screen). Aim for 24 px and up.
- It follows the device hint. It must not draw the TV’s full 2× picture: a canvas of 1920×1080 or more on that window means it follows
devicePixelRatioand not the hint (slow devices). On the runtime files, version 26 or later does this for you. - It isn’t grossly slow. With the CPU slowed 4× for 20 seconds, it averages at least 24 frames a second. A 3D (WebGL) game is measured but not judged on this one, because the build server draws WebGL in software.
To see which screen the game is on, the pass reads window.__game.state.screen ('title', 'playing', 'paused', 'lobby'). A game that doesn’t say can’t show that the remote starts it, so it doesn’t earn TV (Runtime).
Edit this page on GitHub · Something missing or wrong? Tell us.