Screen Size and Fit
Make your HTML5 game fill every phone's game area, see the two sizes RetiPie checks at upload, what Fit to screen does, and engine settings to use.
On RetiPie your game runs in the app's game area: the part of the phone screen under the status bar and above the app's tab bar. Its size depends on the phone, so build a layout that fills whatever area it gets.
The game area
| Orientation | Width | Height |
|---|---|---|
| Portrait | about 360–450 CSS px | about 560–860 CSS px |
| Landscape | about 560–860 CSS px | about 360–450 CSS px |
A landscape game gets the same area turned sideways. RetiPie detects the orientation when you upload.
Your game should:
- Fill the area. Size the page and the canvas to the viewport (
100%ofhtmlandbody), not to a fixed desktop size. - Don't scroll the page. Keep everything inside the area: content below the fold is cut off, and players can't reach it.
- Handle
resize. The area can change size while your game runs. Lay out again on everyresizeevent. - Survive a 0 × 0 size. The game can start before its area is visible. Skip the layout while the width or height is 0 and wait for the next
resize, instead of dividing by zero.
A plain HTML5 setup that does all of this:
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
html, body { margin: 0; height: 100%; overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; }
</style>function layout() {
const width = window.innerWidth;
const height = window.innerHeight;
if (width === 0 || height === 0) return; // not visible yet
resizeGame(width, height); // your own layout code
}
window.addEventListener('resize', layout);
layout();What RetiPie checks at upload
After your build is processed, RetiPie opens it in a phone-sized browser at two reference sizes (CSS px, portrait; turned sideways for a landscape game):
| Reference | Size | Phone |
|---|---|---|
| Small | 375 × 578 | iPhone SE |
| Standard | 393 × 698 | iPhone 16 |
It looks for content that doesn't fit: a page that scrolls, or a visible element or canvas that reaches past the edge, even when overflow: hidden hides it. The result shows on the game page in Slice, and during upload:
| Result | What you see |
|---|---|
| Fits both sizes | Nothing. |
| Cut on the small size only | The Fit to screen switch, turned on for you. |
| Cut on the standard size too | A warning. Fix the layout and upload a new version. Moderators see the warning too. |
| Couldn't be measured | A note. This happens when the game times out, crashes, or needs WebGL that wasn't available. Try it yourself in the Slice preview at a few sizes. |
Fit to screen
When your game is cut only on small phones, RetiPie turns on Fit to screen. During the check it also measures how much room your game needs. On a phone whose game area is smaller than that, the game is laid out at the size it needs and scaled down to fill the area: the whole game shows, slightly smaller, with no black bars. On phones with enough room the game runs at their own size. It's never scaled up.
You can turn the switch off on the game page in Slice. The change applies right away and doesn't need a review. With it off, the bottom of your game may be cut on short phones such as the iPhone SE. To see the difference, open Try the game in the Slice preview, pick iPhone SE under Device, and try the game with the switch on and off.
Fit to screen is a safety net. A layout that fills any area looks better on every phone, so fix the layout when you can.
Engine settings
| Engine | Setting |
|---|---|
| Godot 4 | Project Settings → Display → Window → Stretch: Mode canvas_items, Aspect expand. Web export: Canvas Resize Policy Adaptive. |
| Phaser 3 | scale: { mode: Phaser.Scale.FIT, autoCenter: Phaser.Scale.CENTER_BOTH }, or mode: Phaser.Scale.EXPAND. |
| Unity | Canvas Scaler → UI Scale Mode: Scale With Screen Size, Screen Match Mode: Match Width or Height or Expand, and a Web template whose canvas fills the page. |
| Construct 3 | Project Properties → Display → Fullscreen mode: Scale outer. |
| Cocos Creator 3.8 | Project → Project Settings → Project Data: Design Resolution with Fit Width and/or Fit Height. |
- Godot 4.
canvas_itemswithexpandis the default for projects created in Godot 4.7 or later; set it by hand in older projects. Adaptive is the default Canvas Resize Policy. See Multiple resolutions and the Web export options. - Phaser 3.
FITkeeps your aspect ratio and can leave empty space;EXPAND(Phaser 3.80 or later) grows the visible area to fill it. See the Scale Manager. - Unity. Set Match toward the side your layout depends on. The Default, Minimal and PWA templates fill the window only in mobile browsers; a custom template or CSS that sizes the canvas to 100% of the page works everywhere. See Canvas Scaler, Web templates and Web canvas size.
- Construct 3. Scale outer shows more of the layout instead of black bars, so keep important content near the middle. See Projects and Supporting multiple screen sizes.
- Cocos Creator. With both boxes checked the whole design stays visible and borders may appear; with one, align your UI to the screen edges with the Widget component. See Project Settings and Auto fit for multi-resolution.
Feed preview
RetiPie doesn't take a poster from your game's screen. Add a poster, or a video with its poster, in the Game profile step before your first submission. See Feed preview for formats and limits.
Mobile Readiness Checklist
Check controls, first-screen clarity, loading state, orientation, and runtime behavior before submitting an indie browser game to RetiPie.
Godot HTML5 Export
Prepare a single-threaded Godot 4.3+ Web export, package it as a ZIP for RetiPie, and use the Godot SDK wrapper for lifecycle, analytics, and leaderboards.