home / skills / miles990 / flame_demo_game / flame-systems

flame-systems skill

/skills/flame-systems

This skill helps you implement Flame Engine 14 game systems such as quest, dialogue, inventory, and combat with reference patterns.

npx playbooks add skill miles990/flame_demo_game --skill flame-systems

Review the files below or copy the command above to add this skill to your agents.

Files (15)
SKILL.md
2.8 KB
---
name: flame-systems
description: Flame Engine 14 game systems - quest, dialogue, inventory, combat, save/load, shop, crafting, and more
domain: game-development
version: 2.0.0
tags: [flame, flutter, dart, game-systems, rpg]
---

# Flame Game Systems

14 個常見遊戲系統的實作模式與參考代碼。

## Reference Index

| System | File | Description |
|--------|------|-------------|
| **Quest** | `references/quest.md` | 任務系統、目標追蹤、獎勵 |
| **Dialogue** | `references/dialogue.md` | 對話系統、分支選項、NPC |
| **Localization** | `references/localization.md` | 多語言、文本管理 |
| **Inventory** | `references/inventory.md` | 背包、物品堆疊、分類 |
| **Paper Doll** | `references/paperdoll.md` | 角色外觀、裝備視覺 |
| **Combat** | `references/combat.md` | 戰鬥系統、傷害計算 |
| **Skills** | `references/skills.md` | 技能樹、冷卻、效果 |
| **Save/Load** | `references/saveload.md` | 存檔、序列化、雲端 |
| **Achievement** | `references/achievement.md` | 成就、解鎖、進度 |
| **Shop** | `references/shop.md` | 商店、交易、貨幣 |
| **Crafting** | `references/crafting.md` | 製作、配方、材料 |
| **Procedural** | `references/procedural.md` | 隨機生成、Roguelike |
| **Multiplayer** | `references/multiplayer.md` | 多人連線、同步 |
| **Level Editor** | `references/leveleditor.md` | 關卡編輯器、地圖工具 |

## AI Usage Guide

```
需要任務系統?     → Read references/quest.md
需要對話系統?     → Read references/dialogue.md
需要多語言?       → Read references/localization.md
需要背包系統?     → Read references/inventory.md
需要裝備外觀?     → Read references/paperdoll.md
需要戰鬥系統?     → Read references/combat.md
需要技能系統?     → Read references/skills.md
需要存檔功能?     → Read references/saveload.md
需要成就系統?     → Read references/achievement.md
需要商店系統?     → Read references/shop.md
需要製作系統?     → Read references/crafting.md
需要隨機生成?     → Read references/procedural.md
需要多人連線?     → Read references/multiplayer.md
需要關卡編輯?     → Read references/leveleditor.md
```

## System Dependencies

```
Combat ──→ Skills (技能影響戰鬥)
       ──→ Inventory (裝備影響屬性)
       ──→ Paper Doll (裝備外觀)

Quest ──→ Dialogue (NPC 給予任務)
      ──→ Achievement (完成任務獲得成就)
      ──→ Inventory (任務獎勵物品)

Shop ──→ Inventory (購買物品存入背包)
     ──→ Crafting (購買材料用於製作)

Procedural ──→ Combat (生成敵人)
           ──→ Inventory (隨機掉落)
```

## Related Skills

- `flame-core` - 引擎核心基礎
- `flame-templates` - 遊戲類型模板

Overview

This skill bundles 14 common Flame Engine game systems into a single reference package for JavaScript projects. It provides design patterns, interaction maps, and example implementations for quest, dialogue, inventory, combat, save/load, shop, crafting and more. Use it as a practical blueprint to accelerate system integration and cross-system dependencies. It pairs concise explanations with code-oriented guidance so teams can adapt systems to their game architecture.

How this skill works

Each system is documented with its responsibilities, common data structures, event flows, and integration points with other systems. The reference index maps each system to a focused document (quest, dialogue, inventory, combat, skills, etc.) and shows dependencies so you can sequence implementation. Example code sketches demonstrate serialization, item stacking, quest state machines, combat resolution, and network sync patterns. Read a specific system file to get patterns, sample APIs, and integration notes for that area.

When to use it

  • Starting a new game project on Flame Engine and needing ready-made system patterns.
  • Refactoring or replacing existing game systems with clearer separation of concerns.
  • Planning cross-system interactions like quests awarding inventory items or skills affecting combat.
  • Prototyping features quickly using documented design patterns and code sketches.
  • Preparing multiplayer or procedural content where systems must coordinate state and persistence.

Best practices

  • Follow the documented dependency map to implement systems in a stable order (e.g., inventory before shop).
  • Design systems as small, testable modules with clear public APIs and events for decoupling.
  • Use the save/load patterns to serialize minimal authoritative state and avoid redundant data.
  • Centralize item and localization data to prevent duplication across shop, crafting, and dialogue.
  • Adopt the suggested patterns for deterministic combat calculations to ease testing and multiplayer sync.

Example use cases

  • Implement an RPG core: quest flow, dialogue trees, inventory, equipment visuals (paper doll), and combat rules.
  • Add a shop and crafting loop where players buy materials, craft items, and receive quest rewards.
  • Create procedural zones that spawn enemies and drop inventory using the procedural system plus combat integration.
  • Enable cloud save and load integrating achievements and persistent quest progress for cross-device play.
  • Build multiplayer features by following the multiplayer reference for state synchronization of inventory, quests, and combat events.

FAQ

Are there runnable examples included?

Each reference contains code sketches and implementation notes intended to be adapted; treat them as blueprints rather than drop-in libraries.

How do systems communicate without tight coupling?

Use event-driven patterns and minimal public APIs suggested in the guides. The documentation shows where to emit events (e.g., item acquired, quest completed) and how to subscribe cleanly.