Files
Genarrative/.codex/plugins/game-studio/references/phaser-architecture.md
T
kdletters 9476ff7648
Project CI / Frontend tests (push) Successful in 4m5s
Project CI / Repository checks (push) Successful in 4m23s
Project CI / Backend tests (push) Successful in 5m1s
Project CI / Native shell tests (push) Failing after 10m54s
迁移仓库工具资源到 Codex 并固化执行边界
将 .hermes 工具资源迁移至 .codex

同步代码、文档与 RAG 路径引用

补充任务范围、验收与时间盒执行规则
2026-08-27 13:55:25 +08:00

1.2 KiB

Phaser Architecture

This is the default 2D structure for the plugin.

src/
  game/
    simulation/
      state.ts
      systems/
      rules/
    content/
      encounters/
      items/
      maps/
    input/
      actions.ts
      bindings.ts
    assets/
      manifest.ts
  phaser/
    boot/
    scenes/
      BootScene.ts
      MenuScene.ts
      BattleScene.ts
    view/
      sprites/
      fx/
      camera/
    adapters/
      sceneBridge.ts
  ui/
    hud/
    menus/
    overlays/

Responsibilities

  • simulation/: source of truth for rules and saveable state
  • content/: authored data and encounter configuration
  • input/: action map and physical control bindings
  • assets/: stable manifest keys and asset metadata
  • phaser/scenes/: scene orchestration, not game rules
  • phaser/view/: render and effect helpers
  • ui/: DOM HUD, menus, and narrative panels

Rules

  • Phaser scenes read from and write to the simulation through a defined bridge.
  • Game state changes should not depend on sprite or tween lifetime.
  • Camera behavior should be isolated from combat or movement rules.
  • Use DOM for dense text and settings surfaces.