Skip to content

[1/4] chore(shared): scaffold the phaser game runtime - #94

Merged
arudaev merged 2 commits into
mainfrom
chore/22-scaffold
Oct 23, 2026
Merged

arudaev merged 2 commits into
mainfrom
chore/22-scaffold

Conversation

@Vatsal2005

@Vatsal2005 Vatsal2005 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Create the shared Phaser 3.90 + TypeScript + Vite foundation so both lanes can build against a runnable game. The empty stage starts Boot → Preload → Stage with a separate UI overlay. Bootstrap scenes stay under core to leave lane A folders free. This is the small shared-file foundation PR required by docs/13; dependent lane B work is prepared as a stack, as explicitly authorized; human merges remain bottom up.

Issue

Closes #22

Acceptance criteria

  • Phaser 3.90, TypeScript, Vite; 1280×720 canvas
  • Pixel art, rounded pixels, integer scaling when space permits
  • Boot → Preload → empty Stage + UI overlay
  • Build runs tsc --noEmit then Vite; separate typecheck command
  • Vitest with pure scaling examples and event subscription cleanup
  • Typed bus exposes all six docs/13 event names
  • Six placeholder atlases use documented sizes, idle-00 frames, feet pivots and animation metadata
  • README covers Node 22, install, dev, build and preview

Verification

  • py -3.13 scripts/check_docs.py — 411 files pass
  • git diff --cached --check
  • Clean exported checkout on the same laptop, explicit Node 22.23.4 executable: npm ci, npm run typecheck, npm test (3 tests), npm run build; no audit findings
  • Browser at clean-install Node 22 Vite URL (http://127.0.0.1:5174/): Phaser 3.90 WebGL, 1280×720 canvas and CSS size, empty blue-grey stage, no console warnings/errors
  • Second-machine Node 22 install/typecheck/test/build — confirmed by lane A
  • Vercel preview — deployment integration is [M0-S2] Deploy previews and production on Vercel #23; no URL yet

Screenshots

Local verification captured at tmp/verification/22-scaffold.png (ignored). The stage is intentionally empty; no movement or combat exists in #22. The GitHub browser is signed out, so the screenshot could not be attached through the UI; it is included in the chat handoff. Preview evidence remains pending deployment.

Integration notes

GameEvents exports the six agreed names with typed notification payloads. Lane A confirmed these payloads as written in the linked review comment. No hand-over name was changed.

Stack

Human merge order is bottom up; retarget #111 to main when this merges.

Establish the shared Node 22 build and typed system events so both lanes can integrate against a runnable 1280x720 game.

Keep bootstrap scenes in core until story integration replaces them; preload placeholder atlases through the production format.
Make fresh installs reproducible and provide documented actor dimensions without depending on the art pipeline.
@github-actions github-actions Bot added area:art Sprite sheets, stage plates, direction pack area:delivery Build, Vercel, CI, workflows, the board labels Oct 23, 2026
@Vatsal2005
Vatsal2005 marked this pull request as ready for review October 23, 2026 19:35
@arudaev

arudaev commented Oct 23, 2026

Copy link
Copy Markdown
Member

Lane A answers (Alexander + Claude).

  1. Event payloads: confirmed. Keep GameEvents exactly as written. The fields are additive, the six names match docs/13, and lane A's story and UI scenes will listen to these shapes. docs/13 will name the fields when the scenes land.

  2. Second-machine check: done. On a clean worktree of chore/22-scaffold, Node 22.23.2 on Windows: npm ci (38 packages), npm run typecheck, npm test (2 files, 3 tests) and npm run build all pass. The only warning is the >500 kB chunk, which is Phaser itself. Tick the box.

  3. Atlas names for [M0-S5] Load stage chunks and sprite atlases in the game #24. Real art is already exported (PRs [2/7] art: draw the hero walk, run, idle and air sheets #98–[5/7] art: draw the rover, crab, drone and black-fluid sheets #101, approved) to the docs/13 path game/public/assets/sprites/<board>.png/.json/.anims.json. Use these board ids:

    • hero: hero-move (idle, idle-walk, walk), hero-run (walk-run, run-start, run), hero-idle, hero-air (jump, fall, hard-landing, ladder), hero-hurt (hit, knockback, interact, pick-up, look-at-device), hero-death;
    • chair: chair-side (sweep-a, sweep-b, recoil, chair-pickup), chair-overhead (up, slam, pogo), chair-block (guard-up, guard-hold, guard-impact, guard-break);
    • enemies: enemy-rover, enemy-crab, enemy-drone, fx (black-fluid).

    Frames are <anim>-<nn> from 00 with pivot (0.5, 1). In [M0-S5] Load stage chunks and sprite atlases in the game #24, load by these board ids and fall back to placeholder/ only where a board is missing. The placeholders can keep their names in this PR.

  4. Vercel preview ([M0-S2] Deploy previews and production on Vercel #23) is lane A's and follows as soon as this merges.

No changes needed here. It's ready for Alexander to merge.

@arudaev
arudaev self-requested a review October 23, 2026 20:30
@Vatsal2005 Vatsal2005 changed the title chore(shared): scaffold the phaser game runtime [1/4] chore(shared): scaffold the phaser game runtime Oct 23, 2026
@arudaev
arudaev merged commit b4d3b19 into main Oct 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:art Sprite sheets, stage plates, direction pack area:delivery Build, Vercel, CI, workflows, the board

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M0-S1] Scaffold Phaser 3 + TypeScript + Vite in game/

2 participants