Skip to content

Polish DoF blur, far camera follow, FPS, day/night object tint & night torch, and HUD text - #178

Merged
dominicletz merged 1 commit into
mainfrom
feat/visual-camera-fps-polish
Nov 22, 2026
Merged

dominicletz merged 1 commit into
mainfrom
feat/visual-camera-fps-polish

Conversation

@dominicletz

@dominicletz dominicletz commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Addresses five gameplay and visual polish items (LK-132–LK-136):

  1. Minimize DoF blurriness (LK-132): Widened LOOK.focusBand (0.04 -> 0.14), softened COC_REACH (0.12 -> 0.3), capped COC_MAX_PX (16 -> 4.5), added early-exit when radius < 0.5, and moved the DoF blur pass to half resolution in assets/js/hd2d/picture.js.
  2. Camera follows character past castle tether (LK-133): Updated cameraFocus(x, y) in assets/js/frame.js to preserve 0.72 near-keep framing within cameraTetherNear (240) and smoothly blend to 1:1 hero-centered tracking past cameraTetherFar (520).
  3. Fix FPS issues (LK-134): Gated the artificial 70ms paintGap throttle behind testHooks, cached pictureCell() per 36-unit cell in assets/js/horizon.js (~6.25× less work on chunk crossings), memoized sceneKey(snap) via WeakMap, cached applyFrame() by stage size and town rank (restoring LOOK.fov after portrait arrival in picture.seat), and moved DoF to half-res with early-out.
  4. Day/dusk/night object contrast + night hero torch/aura (LK-135): Added objectTintHex(clock, kind) in assets/js/scene.js and applyPhaseTint() in assets/js/render.js so unlit trees, castle, buildings, props, deer, and monsters soften daytime contrast and dim warmly at dusk and coolly at night. Added a pooled flickering heroTorch point light and warm additive ground heroAura that turn on automatically at dusk/night.
  5. Reduce text clutter over the game (LK-136): Shortened bonus/relic labels (Forge +15%, Spire · recover faster, Relics: 0), laid .bonuses out as a single compact inline row, and trimmed world-pinned caption font sizes and opacity while keeping the 10-slot glass budget and mobile clearances intact.

Verification

  • mix format --check-formatted, mix compile --warnings-as-errors, mix assets.build, mix test --cover (145/145, 82.92%)
  • npm test --prefix assets (323/323), npm run models (21 assets), npm run check --prefix assets
  • node --test e2e/steer.test.js e2e/probe.test.js e2e/roster.test.js e2e/screen.test.js script/ci_budget.test.js (36/36)
  • Playwright local specs: e2e/smoke.spec.js, e2e/perf.spec.js, e2e/mobile.spec.js, twoPlayerNight (including heroTorch day/night assertions), pictureGrade, theFogEdgeIsNotAFlatFill, paradeShowsEveryKind, far from the keep, value steps, portraitHero, and sixSeatMatch.

Note

Low Risk
Client-only graphics, camera, caching, and HUD copy changes with unit and Playwright coverage; no server, auth, or persistence paths touched.

Overview
Visual and client-performance polish spanning camera, post-processing, rendering, horizon painting, and diegetic HUD copy.

Depth of field is toned down via a wider in-focus band, lower max blur, and half-resolution DoF with shader early-outs so distant scenes stay sharper and cheaper to draw.

Camera cameraFocus now keeps keep-tethered framing (0.72 follow) inside radius 240 and smoothly blends to 1:1 hero tracking by 520 so frontier exploration does not walk off-screen.

Frame rate improvements gate the 70ms paintGap throttle to test hooks only, memoize sceneKey per snapshot, cache horizon pictureCell per 36-unit cell in paintWindow, cache applyFrame by stage size/town rank, and skip redundant placeCamera on queue for live players; picture.seat restores world FOV after portrait arrival.

Lighting feel adds objectTintHex phase tints on unlit world/monster sprites and a dusk/night hero torch point light plus ground aura, exposed to E2E via window.__lastKeep.heroTorch.

HUD shortens forge/spire/relic strings, tightens world-pinned caption typography in game.css, and joins relic lines with middots.

Reviewed by Cursor Bugbot for commit 2f5e47a. Configure here.

@dominicletz
dominicletz enabled auto-merge (squash) November 22, 2026 01:50
@cursor

cursor Bot commented Nov 22, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 46483f4d-5ca9-4e16-b7ee-7d02bfb1ce27)

@dominicletz
dominicletz merged commit f8ddbcc into main Nov 22, 2026
12 checks passed
@dominicletz
dominicletz deleted the feat/visual-camera-fps-polish branch November 22, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant