airship-phaser/README.md

43 lines
848 B
Markdown

# airship-phaser
Top-down Phaser.js airship combat prototype.
## Development
```bash
npm install
npm test
npm run dev
```
Production builds run the regression suite before Vite:
```bash
npm run build
```
## Runtime diagnostics
The browser keeps the latest 300 structured events in memory.
In Chrome DevTools:
```js
airshipDebug.getLogs()
airshipDebug.snapshot()
airshipDebug.clearLogs()
```
Useful events include:
- `scene:init`, `scene:create`, `scene:heartbeat`, `scene:shutdown`
- `combat:broadside-fired`
- `combat:player-hit-queued`
- `combat:player-hit-processed`
- `combat:pirate-hit`
- `game:finish`
- `hud:image-error`, `hud:helm-frame-error`, `hud:helm-knob-error`
- `runtime:error`, `runtime:unhandled-rejection`
If gameplay appears frozen, inspect `airshipDebug.snapshot()` first, then the tail of `airshipDebug.getLogs()`.