data-manager

Manage game object and scene data with Phaser 4 DataManager events.

Updated Jun 23, 2026
One-click install
npx skills add https://github.com/Joshua-Allen/stake-engine-game-dev --skill data-manager-joshua-allen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-manager
Source: https://github.com/Joshua-Allen/stake-engine-game-dev/tree/main/skills/data-manager
Command: npx skills add https://github.com/Joshua-Allen/stake-engine-game-dev --skill data-manager-joshua-allen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires phaser, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit helps game developers manage custom key-value data on game objects, listen for data change events, and manage game state effectively using Phaser 4's DataManager.

Core Features & Use Cases

  • Data Management: Store, retrieve, increment, and toggle game data on a per-game-object, per-scene, and global level.
  • Event-Driven Data Tracking: React to data changes in a game with event-driven tracking for flexible and decoupled data management.
  • Use Case: Imagine a game where player scores, health points, and inventory items need to be tracked across different game objects and scenes. This Skill unit enables you to manage all such data efficiently.

Quick Start

Use the data-manager skill to set player health points for a game object at 100: this.dataManager.setData('player.hp', 100).

Frequently Asked Questions about data-manager

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

FAQPage Schema
How do I manage game state and custom data on game objects in Phaser 4?

You can manage game state in Phaser 4 by using a DataManager instance to store, retrieve, and toggle custom key-value data on game objects, scenes, and globally. This enables efficient tracking of variables like player health or inventory.

Does Phaser 4 support event-driven data binding for reactive game development?

Yes, Phaser 4 supports reactive programming through DataManager event emissions. It emits events for set, changed, and removed data, allowing you to react to data changes dynamically and maintain decoupled game logic across different objects and scenes.

What is the best way to track player scores and inventory across multiple scenes in Phaser?

The best way to track player data across scenes is using a global DataManager instance. It handles data sets for game objects and scenes, allowing you to efficiently manage and retrieve shared game state like scores and inventory items.

Can I listen for data change events on specific game objects in Phaser 4?

Yes, you can listen for data change events on specific game objects. The Phaser 4 DataManager provides event-driven tracking that emits signals when data is set, changed, or removed, enabling flexible and decoupled data management for individual objects.

Do I need the Phaser engine to use reactive data management for game development?

Yes, you need the Phaser 4 engine installed as a dependency. The data management functionality directly utilizes Phaser.Data.DataManager and Phaser.Data.DataManagerPlugin to handle reactive data binding and event emissions.

How do I set and update custom key-value data for a game object using Phaser?

You can set custom data using the setData method, such as calling dataManager.setData('player.hp', 100). The DataManager allows you to store, retrieve, increment, and toggle game data efficiently on a per-game-object or per-scene level.