Design and build game user interfaces. HUD, menus, pause, settings, results screens, dialogs, tooltips, inventory panels and on-screen prompts. Covers what to show and when, readability over busy backgrounds, layout for phone and desktop, touch-friendly sizes, keyboard and gamepad menu navigation with focus, canvas UI vs HTML overlays, animation and feedback, button prompts per device, accessib...
Download skill (.zip) Files on GitHubGame UI design
Also read Bash’s apps-and-games skill: keep the interface focused on the activity, with minimal copy.
Show less, at the right time
- HUD: only what the player needs during play (health, score, timer, ammo). Everything else goes in pause or results.
- Diegetic first: show health as the character flashing, ammo on the gun, danger as a red edge, before adding numbers.
- Teach in play, not walls of text: a one-line prompt near the thing (“Hold to charge”), shown until used once.
- Title screen: name, one big Play button, small mute + settings. No paragraphs.
- Results: outcome (big), score + best, one or two stats, Retry (primary) and Menu.
Layout
- Anchor to corners and edges. Score top-left, pause top-right, controls bottom (responsive-game-design).
- Keep the center clear. Respect safe areas.
- Sizes: tap targets ≥ 48 CSS px, body text ≥ 16 px, HUD numbers ≥ 20 px, titles 40–72 px.
- One primary button per screen, visually dominant. Destructive actions (quit, reset save) small, away from primary, with a confirm step.
Readability over gameplay
- Text with a dark outline or shadow, or on a semi-transparent panel (
rgba(0,0,0,0.5), rounded). - Contrast ≥ 4.5:1. Don’t rely on color alone: add icons and shapes (red and ✕).
- Numbers that change: tabular figures (
font-variant-numeric: tabular-numsin HTML), fixed-width layout so they don’t jiggle.
Canvas UI vs HTML overlay
| Canvas-drawn | HTML/CSS overlay |
|---|---|
| HUD, prompts, in-world labels, pixel-art UI | Menus with many options, settings, text input (names), scrolling lists, long text |
| Pixel-perfect with the game, one coordinate space | Free accessibility, focus and keyboard nav, crisp text, responsive layout |
A common split: HUD in canvas, menus in HTML over the canvas (position: absolute; inset: 0), and pause the game while they’re open.
Engine games: use the engine’s UI or DOM elements (Phaser this.add.dom).
Navigation for every device
- Menus must work with mouse/touch, keyboard (arrows + Enter/Space, Esc = back) and gamepad (d-pad + A, B = back).
- Always show which item is focused (outline + scale). Default focus on the primary button.
- Back always works and goes one level up. Esc or Start in play opens pause.
- Show prompts for the last-used device (“Press Space” / “Press A” / “Tap”) (universal-input-system).
Feel
- Buttons react on press: scale 0.95, color change, a click sound. Results count up quickly, new best gets a burst.
- Screen changes: short fades or slides (150–300 ms), never block input for long.
- Respect
prefers-reduced-motion: no shake, fewer tweens.
Settings worth having
Volume (music and sound separately) + mute, screen shake on/off, (if relevant) controls / rebinding, difficulty or assist, language. Save them immediately (game-state-management).
Copy
Short, active, friendly: “Play”, “Try again”, “Next level”, “Paused”. No “Click here to begin your adventure”. Numbers with units only when unclear. Name things the same everywhere.
Check
set_preview_viewport phone and desktop → look_at_preview on title, HUD in play, pause, results. Tab through menus with the
keyboard, tap through on phone size, and check nothing overlaps the action or the thumbs.