📚 Encyclopedia

Games & Graphics · updated 2026-10-13

Platformer camera, viewport size, and aspect ratios

cameraviewportaspect-ratioplatformermobilesafe-area

How much of the level a 2D platformer should show, how the camera should follow, and how to handle the many phone aspect ratios fairly. Numbers come from Run's research (2026-04) and its actual setup.

Viewport size

Game Base resolution Tile Tiles visible
Celeste 320x180 8 px 40 x 22.5
Super Meat Boy 1280x720 design ~36 px ~35 x 20
Geometry Dash auto-runner ~30 px 20-25 ahead, player at left 25%
SNES classic 256x224 16 px 16 x 14
- Run: fixed logical 1067x600 (16:9) via CameraComponent.withFixedResolution, 32 px tiles,
so ~33 x 19 tiles. Generous, good for a speedrunner who needs to see ahead.
- The player sprite should fill about 3-5% of screen height (32/600 = 5.3%).
- Celeste's trick: very low logical resolution upscaled nearest-neighbor for crisp pixel art.

Follow behavior

Aspect ratios

Ratio Devices Result with fixed 16:9
16:9 older phones perfect fit
20:9, 21:9 modern phones, folded foldables pillarbox
4:3, 3:2 tablets, iPad mini letterbox (~20% of height on 4:3)
Strategies: (1) fixed 16:9 with bars: every player sees the same area, which keeps speedrun
competition fair (Run's choice); (2) expand width on wide screens: no bars but wide-screen
players see hazards earlier; (3) hybrid: fix height, let width grow to a cap (~1200 px). Fill
tablet letterbox bars with a themed gradient rather than black. Controls can live in the
pillarbox area.

Safe areas and notches

HUD layout

Timer top center with the level name just below (eyes stay near the action); utility buttons top right; nothing tappable in the bottom third (controls zone). Auto-fade static info like the level name after ~2 s, fade HUD when the player passes beneath it, and show contextual items (coins, abilities) only when relevant.

See also

Linked from

Sources: run memory (research-mobile-game-ui.md, research-platformer-design.md, speedrun-platformer.md, session-v065-v075.md)