phaser-saveload

Implement versioned game data persistence for Phaser 4 using localStorage and IndexedDB.

17|1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Yakoub-ai/phaser4-gamedev --skill phaser-saveload
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: phaser-saveload
Source: https://github.com/Yakoub-ai/phaser4-gamedev/tree/main/skills/phaser-saveload
Command: npx skills add https://github.com/Yakoub-ai/phaser4-gamedev --skill phaser-saveload

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill solves the lack of a native persistence layer in Phaser 4 by providing robust, versioned, and type-safe mechanisms to save and load game progress, user settings, and high scores.

Core Features & Use Cases

  • Versioned Save Management: Handles schema migrations automatically to prevent save corruption when game data structures evolve.
  • Multi-Slot & Settings Persistence: Supports distinct storage keys for game progress, user preferences, and high-score tables.
  • Use Case: Use this to implement a robust auto-save system that triggers on scene changes or periodic intervals, ensuring players never lose progress due to browser crashes or tab closures.

Quick Start

Use the phaser-saveload skill to generate a typed SaveManager class and integrate it into your current Phaser 4 scene to persist player progress.

Frequently Asked Questions about phaser-saveload

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I save Phaser 4 game state using browser localStorage?

To save Phaser 4 game state using localStorage, implement a typed SaveManager class that serializes game data and writes it to browser storage. This skill provides structured TypeScript patterns to handle saving, loading, and validating progress across sessions.

What is the best way to handle save data versioning and migration in a Phaser game?

Save data versioning and migration in a Phaser game requires tracking schema versions and applying migration logic during load. This skill implements versioned save management that automatically handles schema migrations to prevent corruption when data structures evolve.

Can I use IndexedDB with Phaser 4 for storing high-score tables?

Yes, you can use IndexedDB with Phaser 4 for storing high-score tables. This skill implements persistent data storage using both localStorage and IndexedDB, managing distinct storage keys for game progress, user preferences, and high-score tables.

Does this approach work for auto-saving game progress on scene changes?

Yes, this approach works for auto-saving game progress on scene changes. You can integrate the typed SaveManager into your Phaser 4 scene to trigger periodic saves, ensuring players never lose progress due to browser crashes or tab closures.

How do I persist user settings separately from game progress in TypeScript?

To persist user settings separately from game progress in TypeScript, use distinct storage keys for different data categories. This skill provides structured patterns supporting multi-slot persistence to keep user preferences, high scores, and progress isolated.

What are the limitations of using localStorage for Phaser 4 game persistence?

Limitations of localStorage for Phaser 4 game persistence include storage size constraints and potential data corruption during schema updates. This skill mitigates these by combining IndexedDB support with built-in versioning and migration logic for robust data validation.