Skip to content

v2.6.5 fix(game): improve HireRPG English font - #37

Merged
realRoc merged 4 commits into
mainfrom
fix/game-lang-switch-pixel-ui
Jun 3, 2026
Merged

v2.6.5 fix(game): improve HireRPG English font#37
realRoc merged 4 commits into
mainfrom
fix/game-lang-switch-pixel-ui

Conversation

@realRoc

@realRoc realRoc commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

Game UX

  • Keeps the HireRPG title CTA visible in the first viewport on desktop and mobile.
  • Improves mobile map/battle layout so HUD, backpack/codex controls, battle explanations, and continue actions do not fight for the same fixed space.
  • Adds held keyboard/touch movement while keeping keyboard-style D-pad activation one-shot for assistive input.
  • Scrolls game transitions back to the top so start, battle, game-over, and map returns do not land mid-page.

English font

  • Replaces the English game body font with Pixelify Sans while keeping Press Start 2P for the title face.
  • Keeps English first load from injecting the heavy Zpix font, while restoring Zpix injection for Chinese first paint.

English mirror assets

  • Teaches the English mirror generator to rewrite favicon.svg to ../favicon.svg.
  • Adds npm run check:en-assets to guard /en/ root-asset links.

Version/tag note

  • The live pre-fix state was tagged and pushed as v2.6.4 before fixes, per request.
  • This repo has no VERSION or CHANGELOG.md; release history is tag-based, so this PR does not introduce a new version file.

Test Coverage

CODE PATHS                                      USER FLOWS
[+] docs/game.html                              [+] English HireRPG load
  ├── [★★★ TESTED] EN font stack                  ├── [★★★ TESTED] Pixelify body font via /browse
  ├── [★★★ TESTED] zh Zpix first paint            ├── [★★★ TESTED] English does not inject Zpix
  ├── [★★★ TESTED] D-pad keyboard click           ├── [★★★ TESTED] Keyboard click leaves heldDir null
  └── [★★ TESTED] responsive title/battle         └── [★★ TESTED] Mobile start/map/battle reveal flow

[+] scripts/build-en.mjs                         [+] English mirror pages
  └── [★★★ TESTED] root asset rewrite             └── [★★★ TESTED] favicon resolves to ../favicon.svg

COVERAGE: 7/7 paths tested (100%)
Tests: 0 formal test files -> 0 (+1 Node regression check script)

Pre-Landing Review

  • Inline review: no remaining issues.
  • Codex adversarial initially found D-pad held-state and zh Zpix first-paint issues; both were fixed.
  • Codex branch review against origin/main: no discrete, actionable regressions found.

Design Review

Design Review (lite): no issues found. Browser verification covered desktop English first viewport, mobile English first viewport, map entry, and battle reveal/continue layout.

Eval Results

No prompt-related files changed; evals skipped.

Plan Completion

No current plan file detected for this HireRPG game/font ship. A stale English-mirror plan was found locally but did not match this branch's primary work.

Verification Results

  • npm run build:en
  • npm run check:failsafe
  • npm run check:en-assets
  • git diff --check
  • /browse desktop English game: Pixelify body font, title CTA visible, no console errors
  • /browse mobile English game: Pixelify body font, map entry, D-pad keyboard click leaves heldDir null, no console errors
  • /browse Chinese game: Zpix injected on first paint, no console errors

Test plan

  • Static English mirror builds successfully
  • Reveal failsafe remains intact
  • English mirror root assets resolve from the site root
  • Desktop/mobile HireRPG smoke flow passes

Generated with Codex.

@realRoc

realRoc commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

🤖 由 Codex 自动生成

Blocker / 必须修正

  • docs/game.html:1425 / docs/game.html:1433onKeyUpG.screen !== 'map' 时直接返回,导致按住方向键撞进怪物进入 battle 后,用户松开键不会清掉 G.heldDir。之后从 battle 回到地图时旧方向仍保留,下一次任意移动完成后 updateMap 会继续按旧方向自动 tryStep,出现松手后仍连续移动的问题。建议在离开 map / 进入 battle 前清空 G.heldDir,或让 keyup 即使不在 map 屏也能清理对应 held direction。

建议

  • 可在 startBattle()backToMap() 或通用 screen transition 里集中重置移动输入状态,并补一条回归:按住方向键触发 battle,battle 中松开,返回地图后不应继续沿旧方向移动。

结论:❌ 暂不可合并(存在 blocker)

@realRoc

realRoc commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

🤖 由 Codex 自动生成

建议

  • 建议把 docs/game.html 的 held movement 行为补进自动化回归:覆盖 pointer hold 连续移动、键盘 repeat 连续移动、以及辅助输入触发的 clickevent.detail === 0)只走一步,避免后续调整 D-pad 事件绑定时重新引入重复移动或无法停止的问题。

结论:✅ 可以合并

@realRoc
realRoc merged commit f3e681a into main Jun 3, 2026
1 check passed
@realRoc
realRoc deleted the fix/game-lang-switch-pixel-ui branch June 3, 2026 02:37
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