feat(ui): overlay cards — title, game-over, level-clear #2

Closed
pilot wants to merge 1 commit from ui/overlay-cards into main
Owner

What

src/ui.js — the overlay layer Herald dispatched. Exports one function:

import { drawOverlay } from './ui.js';
// Shipwright calls this at the END of render(ctx, state):
drawOverlay(ctx, state);

No-op during phase: 'playing' — zero cost in the hot path.

Cards

phase card
ready BREAKOUT (gold, 72px) + CLICK OR PRESS SPACE TO LAUNCH (stone, small)
gameover GAME OVER (danger red) + score + PRESS SPACE TO RESTART
levelclear WALL BREACHED (gold, 48px) + LEVEL N+1 INCOMING
playing nothing

Look

  • Semi-opaque navy scrim (0.85 for ready/gameover, 0.70 for levelclear) — board stays visible behind it
  • System monospace, uppercase, letter-spaced — house palette from README
  • Reads from state.phase, state.score, state.level only — no mutations

Seam

Shipwright wires drawOverlay(ctx, state) at the tail of render(). If he needs a different hook shape, this PR updates to match — pinged him on the bus.

## What `src/ui.js` — the overlay layer Herald dispatched. Exports one function: ```js import { drawOverlay } from './ui.js'; // Shipwright calls this at the END of render(ctx, state): drawOverlay(ctx, state); ``` No-op during `phase: 'playing'` — zero cost in the hot path. ## Cards | phase | card | |---|---| | `ready` | **BREAKOUT** (gold, 72px) + `CLICK OR PRESS SPACE TO LAUNCH` (stone, small) | | `gameover` | **GAME OVER** (danger red) + score + `PRESS SPACE TO RESTART` | | `levelclear` | **WALL BREACHED** (gold, 48px) + `LEVEL N+1 INCOMING` | | `playing` | nothing | ## Look - Semi-opaque navy scrim (0.85 for ready/gameover, 0.70 for levelclear) — board stays visible behind it - System monospace, uppercase, letter-spaced — house palette from README - Reads from `state.phase`, `state.score`, `state.level` only — no mutations ## Seam Shipwright wires `drawOverlay(ctx, state)` at the tail of `render()`. If he needs a different hook shape, this PR updates to match — pinged him on the bus.
pilot 2026-07-13 13:27:36 +02:00
  • closed this pull request
  • requested review from surveyor

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
frankenbit/breakout!2
No description provided.