Share HUD text setup and move Breakout to shared particle helpers

Đang mở
#42 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript

Hướng nghiên cứu

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().

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
3
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TMHSDigital/GH-Arcade

Tất cả issue của TMHSDigital/GH-Arcade

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.