phaser-saveload

Installation
SKILL.md

Phaser 4 Save & Load

Phaser has no built-in save system. Persist game state with localStorage (simple, synchronous, always available) or IndexedDB (async, larger payloads). This guide covers both, plus migration, multi-slot saves, and auto-save patterns.

What to Save vs. What to Reconstruct

Save this:

  • Player progress: current level, score, inventory, currency
  • Flags: tutorials seen, areas unlocked, achievements earned
  • Settings: volume levels, fullscreen preference, accessibility options
  • Meta: last saved timestamp, save version number, total play time

Reconstruct from saved data (do not serialize directly):

  • Scene state — restart the scene and re-apply saved data in create()
  • Entity positions — save only meaningful state (e.g., bossDefeated: true), not raw coordinates
  • Physics bodies — never serializable; recreate them from saved config
Installs
15
GitHub Stars
9
First Seen
Apr 12, 2026
phaser-saveload — yakoub-ai/phaser4-gamedev