phaser-gamedev

用于使用 Phaser 3(JS/TS)构建 2D 浏览器游戏的说明。涵盖场景、精灵、物理系统(Arcade/Matter)、瓦片地图(Tiled)、动画与输入控制等内容。触发词示例包括“Phaser 场景”、“Arcade 物理”、“瓦片地图”、“Phaser 3 游戏”。

仓库最近推送
GitHub Stars
157
Forks
45
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "phaser-gamedev":https://skillpi.com/zh/skills/deepskill-81fec1603b874f29a93d2d3b9af9097d96d5c7c08cb47e7be9ef1c6515d0bc00。安装前核对上游来源和版本:https://github.com/chongdashu/vibejam-starter-pack。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

用于使用 Phaser 3(JS/TS)构建 2D 浏览器游戏的说明。涵盖场景、精灵、物理系统(Arcade/Matter)、瓦片地图(Tiled)、动画与输入控制等内容。触发词示例包括“Phaser 场景”、“Arcade 物理”、“瓦片地图”、“Phaser 3 游戏”。

0 下载

介绍来源: third_party · chongdashu · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: phaser-gamedev
description: "Build 2D browser games with Phaser 3 (JS/TS): scenes, sprites, physics (Arcade/Matter), tilemaps (Tiled), animations, input. Trigger: 'Phaser scene', 'Arcade physics', 'tilemap', 'Phaser 3 game'."

Phaser Game Development

Build 2D browser games using Phaser 3's scene-based architecture and physics systems.


STOP: Before Loading Any Spritesheet

Read spritesheets-nineslice.md FIRST.

Spritesheet loading is fragile—a few pixels off causes silent corruption that compounds into broken visuals. The reference file contains the mandatory inspection protocol.

Quick rules (details in reference):

  1. Measure the asset before writing loader code—never guess frame dimensions
  2. Character sprites use SQUARE frames: If you calculate frameWidth=56, try 56 for height first
  3. Different animations have different frame sizes: A run cycle needs wider frames than idle; an attack needs extra width for weapon swing. Measure EACH spritesheet independently
  4. Check for spacing: Gaps between frames require spacing: N in loader config
  5. Verify the math: imageWidth = (frameWidth × cols) + (spacing × (cols - 1))

Reference Files

Read these BEFORE working on the relevant feature:

When working on... Read first
Loading ANY spritesheet spritesheets-nineslice.md
Nine-slice UI panels spritesheets-nineslice.md
Config, scenes, objects, input, animations core-patterns.md
Tiled tilemaps, collision layers tilemaps.md
Physics tuning, groups, pooling arcade-physics.md
Performance issues, object pooling performance.md

Architecture Decisions (Make Early)

Before building, decide:

  • What scenes does this game need? (Boot, Menu, Game, UI overlay, GameOver)
  • What are the core entities and how do they interact?
  • What physics model fits? (Arcade for speed, Matter for realism, None for menus)
  • What input methods? (keyboard/gamepad/touch)

Physics System Choice

System Use When
Arcade Platformers, shooters, most 2D games. Fast AABB collisions
Matter Physics puzzles, ragdolls, realistic collisions. Slower, more accurate
None Menu scenes, visual novels, card games

Core Principles

  1. Scene-first architecture: Organize code around scene lifecycle and transitions
  2. Composition over inheritance: Build entities from sprite/body/controllers, not deep class trees
  3. Physics-aware design: Choose collision model early; don't retrofit physics late
  4. Asset pipeline discipline: Preload everything; reference by keys; keep loading deterministic
  5. Frame-rate independence: Use delta for motion and timers; avoid frame counting

Anti-Patterns

Anti-Pattern Problem Solution
Global state on window Scene transitions break state Use scene data, registries
Loading in create() Assets not ready when referenced Load in preload(), use Boot scene
Frame counting Game speed varies with FPS Use delta / 1000
Matter for simple collisions Unnecessary complexity Arcade handles most 2D games
One giant scene Hard to extend Separate gameplay/UI/menus
Magic numbers Impossible to balance Config objects, constants
No object pooling GC stutters Groups with setActive(false)

Variation Guidance

Outputs should vary based on:

  • Genre (platformer vs top-down vs shmup)
  • Target platform (mobile touch, desktop keyboard, gamepad)
  • Art style (pixel art scaling vs HD smoothing)
  • Performance envelope (many sprites → pooling; few sprites → simpler code)

Remember

Phaser provides powerful primitives—scenes, sprites, physics, input—but architecture is your responsibility.

Think in systems: define the scenes, define the entities, define their interactions—then implement.

Codex can build complete, polished Phaser games. These guidelines illuminate the path—they don't fence it.

版本历史

  1. v1.2.1 GitHub ↗
    原版更新说明

    ## [1.2.1] - 2026-04-12 ### Added - CHANGELOG.md - Phaser 4 game dev agent skill (`phaser4-gamedev`) — WebGL-first renderer, filters, lighting, shaders, SpriteGPULayer, TilemapGPULayer, and Phaser 3 → 4 migration guidance - "How I'm Vibe Coding A Game For the Vibe Jam" tutorial video

  2. v1.1.0 GitHub ↗
    原版更新说明

    Updated starter pack with .agents layout, improved README/START-HERE guidance, and refreshed release zip.

  3. v1.0.0 GitHub ↗
    原版更新说明

    Free Vibe Jam starter pack — battle-tested ThreeJS and Phaser agent skills, starter projects, and prompts.

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值75/100

待提升项

  • 缺少 When to Use 章节 原报告严重程度:轻微

    文档未明确说明何时使用此 Skill,用户难以快速判断适用场景。

    改进建议:在文档开头添加 When to Use 章节,说明适合 Phaser 3 游戏开发的场景。

亮点

  • 提供 Phaser 3 游戏开发的系统性指导,涵盖场景、物理、瓦片地图等核心模块
  • 强调架构决策和最佳实践,帮助用户避免常见陷阱
触发精准78/100

待提升项

  • 触发词覆盖不全 原报告严重程度:轻微

    缺少部分常见变体,如 'Phaser3'、'Tiled map',可能导致漏触。

    改进建议:补充常见拼写变体和同义词,提高触发覆盖率。

亮点

  • 触发词覆盖了 Phaser 3 开发的主要场景,边界清晰
结构规范72/100

待提升项

  • 缺少端到端示例 原报告严重程度:轻微

    文档缺乏完整的游戏开发示例,用户难以理解如何组合各模块。

    改进建议:添加一个简单的端到端示例,展示从场景创建到游戏运行的全流程。

  • 缺少 When to Use 章节 原报告严重程度:轻微

    文档未明确说明何时使用此 Skill,用户难以快速判断适用场景。

    改进建议:在文档开头添加 When to Use 章节,说明适合 Phaser 3 游戏开发的场景。

亮点

  • 文档结构清晰,分 STOP、Reference Files、Architecture Decisions、Core Principles、Anti-Patterns、Variation Guidance、Remember 等章节,逻辑完整
执行可靠70/100

待提升项

  • 工具来源不明 原报告严重程度:轻微

    未明确说明 Phaser 3 的具体版本要求或 CDN 链接,用户可能使用不兼容版本。

    改进建议:在文档开头添加 Phaser 3 的版本要求和官方 CDN 链接。

亮点

  • 强调资产加载规范、物理系统选择、性能优化等,具备良好可靠性指导
证据可验 (前四项均值)74/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。