Skip to content

adj: improve HUD readability with responsive scaling (all viewports) - #53

Merged
theghost1980 merged 1 commit into
mainfrom
codex/improve-hud-readability-for-all-viewports
Feb 8, 2026
Merged

theghost1980 merged 1 commit into
mainfrom
codex/improve-hud-readability-for-all-viewports

Conversation

@saturnoTest

Copy link
Copy Markdown
Member

Motivation

  • Improve HUD legibility and visual hierarchy across desktop and mobile by increasing text/icon sizes and spacing while keeping the same HUD data and without touching gameplay logic.
  • Make the HUD responsive with a single, scalable implementation so the timer stays genuinely centered and elements keep balanced on resize.

Description

  • Add base HUD metrics and a maximum scale (HUD_BASE_*, HUD_MAX_SCALE) and new instance fields for scaled values (hudScale, hudHeight, hudPadding, hudFontSize, etc.).
  • Implement applyHudScale to compute a viewport-based scale from width/height and apply it to font sizes, icon scales, gaps, padding and panel height, and wire it into resizeHud and createHud.
  • Update createHud, resizeHud and layoutHud to use scaled values (fonts, coin/fish icon scales, gaps and padding), keep the center timer position, and use UI_RECTANGLE_GRADIENT as the panel background with increased height.
  • Soften HUD text styling by reducing strokeThickness and adding a subtle drop shadow; preserve fish overlay/progress logic and all existing score/coin/fish mechanics.

Testing

  • Ran npm run typecheck and it completed successfully.
  • Ran npm run build (TypeScript build + vite build) and it completed successfully.
  • Launched the dev server and ran an automated Playwright script to capture a desktop screenshot of the HUD, which produced an artifact without errors.

Codex Task

@saturnoTest
saturnoTest requested a review from a team February 8, 2026 00:52
@theghost1980
theghost1980 merged commit 5b7f33e into main Feb 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants