Validate that a web game works on phones and tablets. Layout at phone portrait and landscape and tablet sizes, safe areas, touch controls (reach, size, multi-touch, no page scroll or zoom), orientation changes mid-game, audio unlock on first tap, performance with CPU throttling, the mobile browser toolbar, iOS Safari quirks, and the real device through the viewer's Bash preview. Use after addin...
Download skill (.zip) Files on GitHubGame mobile testing
About half of Bash viewers are on phones. A game isn’t done until it’s been checked at phone size with touch.
1. The viewer’s browser (best: it may be a real phone)
set_preview_viewport device: phone, orientation: portrait → look_at_preview
set_preview_viewport device: phone, orientation: landscape → look_at_preview
set_preview_viewport device: tablet → look_at_preview
control_preview: click / drag at the touch controls → look_at_preview
set_preview_viewport action: restore (always restore afterwards)
This is also the way to check WebGL games on mobile sizes (never in the sandbox browser).
2. Sandbox (2D / DOM games)
python3 <playwright-game-testing>/scripts/playtest.py http://localhost:8000/ --sizes phone,phone-landscape,tablet --steps touch-steps.json
python3 <game-browser-testing>/scripts/browser-check.py http://localhost:8000/ --sizes phone,phone-landscape
python3 <game-performance-profiling>/scripts/profile.py http://localhost:8000/ --size 390x844 --throttle 4
Use {"tap": [x, y]} and {"drag": [...]} steps on the touch buttons and joystick. View every screenshot.
Checklist
| Area | Check |
|---|---|
| Layout | Nothing cut off at 390×844 and 844×390; HUD readable (≥ 16 px text); no scrollbars |
| Safe areas | HUD and buttons clear of the notch and the home bar (env(safe-area-inset-*)) |
| Touch | Every action reachable by touch; targets ≥ 48 px; thumbs don’t cover the action; two fingers at once work |
| Gestures | No page scroll, pull-to-refresh, pinch-zoom or double-tap zoom on the game (touch-action: none) |
| Orientation | Rotating mid-game resizes correctly, keeps state, and pauses if needed |
| Audio | Sound starts after the first tap (iOS needs the AudioContext resumed in a touch handler) |
| Speed | Throttled ×4 profile still near 60 fps (or adaptive quality kicks in) |
| Keyboard-free | No step needs a keyboard (name entry uses an HTML input) |
| Toolbar | Bottom controls aren’t hidden by the mobile browser bar (100dvh, not 100vh) |
| Backgrounding | Switching apps pauses the game and audio; returning resumes cleanly |
iOS Safari quirks to remember
No element fullscreen on iPhone; vibrate does nothing; audio only after a gesture; 100vh includes the toolbar; long-press
selects text unless user-select: none; WebGL memory is tighter (smaller textures).
Report
Name the sizes and how it was tested: “Checked phone portrait and landscape and tablet in your preview; touch joystick and jump work together; no page scroll. Not tested on a physical iPhone.”