Share HUD text setup and move Breakout to shared particle helpers

オープン
#42 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript

調査の方向性

Read shared/ui.ts:101-122 and the listed game scene locations to compare the repeated HUD setup and existing shared particle helpers. Start with games/breakout/scenes/BootScene.ts:27-28 and games/breakout/scenes/GameScene.ts:115; use npm run typecheck and npm run build to check the changes. Done when HUD text styling is defined once and Breakout uses sparkTexture() and burstEmitter().

索引モデルが issue の本文から書いたものです。

説明

severity: low tech-debt

Summary

The same HUD text style literal and score text setup are repeated in seven game scenes plus the template, with different depths for the same element. Breakout builds its own spark texture and burst emitter while the other nine games use the shared helpers.

Where

  • For example games/astro/scenes/GameScene.ts:144-145, games/hop/scenes/GameScene.ts:104-105, games/siege/scenes/GameScene.ts:154-155
  • games/breakout/scenes/BootScene.ts:27-28, games/breakout/scenes/GameScene.ts:115
  • shared/ui.ts:101-122

Impact

A HUD restyle (font size, text colour for another palette, safe-area offset) is an eight-file edit, and Breakout is missed by any change to the shared particle helpers.

Suggested fix

Add HUD_STYLE and hudText(scene, x, y, text, size?) to shared/ui.ts and migrate one game per commit. Switch Breakout to sparkTexture() and burstEmitter().

Acceptance criteria

  • HUD text style is defined once
  • Breakout uses the shared particle helpers

Getting started

  • Relevant files: shared/ui.ts, games/breakout/scenes/BootScene.ts, games/breakout/scenes/GameScene.ts
  • Run locally: npm install, then npm run dev
  • Checks: npm run typecheck and npm run build (there is no test suite yet)
  • Related docs: README.md

Filed by repo-audit/full-audit at b001f5d. Severity: low. Effort: S. audit-key: tech-debt|shared/ui.ts|hudText

主要言語
TypeScript
スター
3
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/GH-Arcade のほかの issue

TMHSDigital/GH-Arcade の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。