packages/engine/is clean — dead systems deleted, typecheck passesapps/web/src/runtime/legacyCanvasSession.tshas broken imports referencing deleted engine modules- Need to fix the web app AND set up Phaser 4 runtime
These imports from @clawgame/engine no longer exist:
GameLoopCoordinator— deletedDamageSystem— deletedPreviewHUD— deletedtype HUDState— deletedtype MinimapEntity— deletedtype HUDTowerDefenseStats— deleted
The file needs to be fixed to NOT import these. The actual game logic should be self-contained in the web app, not depend on deleted engine abstractions.
- Remove all imports of deleted engine modules
- Inline the minimal types needed (HUDState, etc.) directly in the file or a local types file
- Remove usages of
GameLoopCoordinator,DamageSystem,PreviewHUD— the game loop and rendering are already manual in this file - The actual TD game logic in
createTowerDefenseState,towerDefenseGameLoop, etc. should work as-is since they're self-contained
- These import
LegacyCanvasPreviewSessionOptionswhich no longer exists - Fix the exports/types
- Run:
pnpm --filter @clawgame/phaser-runtime add phaser - Rewrite
ClawgamePhaserScene.tsto extendPhaser.Scene - Rewrite
ClawgamePhaserRuntime.tsto create a realPhaser.Gameinstance - Create a
TowerDefenseScene.tsthat ports the TD game logic
- Update
apps/web/src/runtime/index.tsto make Phaser4 the default - Update
phaserPreviewSession.tsto actually boot Phaser
pnpm typecheckmust passpnpm testmust pass (or at least no new failures)
apps/web/src/runtime/legacyCanvasSession.ts— the broken file (834 lines)apps/web/src/runtime/phaserPreviewSession.ts— needs fixingapps/web/src/runtime/runPreviewRuntimeSession.ts— needs fixingapps/web/src/runtime/index.ts— runtime registrypackages/phaser-runtime/src/— all filespackages/engine/src/index.ts— see what's still exportedpackages/engine/src/types.ts— see current type exportsapps/web/src/utils/previewTowerDefense.ts— the actual TD game logic to port
- Don't touch
apps/api/ - Use pnpm workspaces
- TypeScript strict mode
- After all changes:
pnpm typecheckmust pass clean