phaser-2d-game — скилл для Codex: что делает и установка
Скилл помогает собирать 2D-игры для браузера на Phaser, TypeScript и Vite. Подходит для сцен, игровой логики, камер, анимации спрайтов и HUD.
npx skills add openai/plugins --skill phaser-2d-game -a codexЧто делает phaser-2d-game
Скилл задаёт архитектуру 2D-игры на Phaser, TypeScript и Vite. Игровое состояние хранится вне сцен: отдельные системы отвечают за правила, движение, бой, инвентарь и прогрессию, а сцены связывают это состояние со спрайтами, камерой, анимацией и эффектами.
Внутри есть рекомендации для сцен загрузки, меню, игрового процесса и отладки. Для HUD, меню команд, настроек и сюжетных панелей предлагается DOM-слой поверх canvas. Ассеты организуются по каталогам characters/, environment/, ui/, fx/, audio/ и data/, а игровые ссылки на ресурсы проходят через стабильные ключи манифеста.
Ставьте его, если проект строится на Phaser и требует отделить правила игры от отображения. Для игры с другой технологией рендера этот скилл лучше обойти.
Какие задачи решает
- собрать 2D-игру для браузера на Phaser
- разделить игровую логику и сцены
- настроить камеры и анимацию спрайтов
- вынести HUD и меню в DOM-слой
- организовать ассеты через манифест
Примеры запросов агенту
- Собери прототип тактической игры на Phaser, TypeScript и Vite с отдельной системой ходов и сценой gameplay.
- Добавь follow-камеру, анимацию персонажа и DOM-HUD для статуса героя.
- Разложи ресурсы по `characters/`, `environment/`, `ui/`, `fx/`, `audio/` и `data/`, затем подключи их через manifest keys.
Как установить phaser-2d-game
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill phaser-2d-game -a codex2Вручную: положить файлы
.agents/skills/phaser-2d-game/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add openai/plugins --skill phaser-2d-game -a claude-code2Вручную: положить файлы
~/.claude/skills/phaser-2d-game/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/phaser-2d-game/
Вручную: положить файлы
.cursor/skills/phaser-2d-game/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install openai/plugins phaser-2d-game2Вручную: положить файлы
.github/skills/phaser-2d-game/SKILL.mdКомандой платформы
gemini skills install https://github.com/openai/plugins --path plugins/game-studio/skills/phaser-2d-gameВручную: положить файлы
.devin/skills/phaser-2d-game/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора201
Весь набор →Похожие
Вопросы о phaser-2d-game
Как установить phaser-2d-game в Codex?
Выполните npx skills add openai/plugins --skill phaser-2d-game или npx skills add openai/plugins --skill phaser-2d-game -a codex. Файл скилла появится по пути .agents/skills/phaser-2d-game/SKILL.md.
Что делает phaser-2d-game?
Он помогает проектировать 2D-игры на Phaser с TypeScript и Vite. Скилл описывает разделение систем игры и Phaser-сцен, работу камер, спрайтов, анимации и DOM-интерфейсов.
Какие типы 2D-игр поддерживает phaser-2d-game?
Рекомендации подходят для пошаговых сеток и тактики, top-down-исследования, платформеров с видом сбоку, боевых сцен с анимацией спрайтов и лёгких management- или deck-driven-сцен.
Исходный текст
SKILL.md · MIT
--- name: phaser-2d-game description: Implement 2D browser games with Phaser. Use when the user wants a Phaser, TypeScript, and Vite stack for scenes, gameplay systems, cameras, sprite animation, and DOM-overlay HUD patterns. --- # Phaser 2D Game ## Overview Use this skill for the main execution path in this plugin. Phaser is the default stack for 2D browser games here because it handles rendering, timing, sprites, cameras, and scene orchestration well without forcing gameplay rules into the framework. Preferred stack: - Phaser - TypeScript - Vite - DOM-based HUD or menus layered over the game canvas ## Architecture 1. Keep gameplay state outside Phaser scenes. - Systems own rules, turn order, movement, combat, inventory, objectives, and progression. - Phaser scenes adapt system state into sprites, camera motion, animation playback, and effects. 2. Make scenes thin. - Boot and asset preload - Menu or shell scene - Gameplay scene - Optional overlay or debug scene 3. Keep renderer-facing objects disposable. - Sprite containers, emitters, tweens, and camera rigs are view state, not source of truth. 4. Favor stable asset manifest keys over direct file-path references throughout gameplay code. ## Implementation Guidance - Use one integration boundary where the scene reads simulation state and emits input actions back. - Prefer deterministic system updates over scene-local mutation. - Treat HUD and menus as DOM when text, status density, or responsiveness matter. - Keep animation state derived from gameplay state rather than ad hoc sprite flags. ## 2D Modes Covered Well - Turn-based grids and tactics - Top-down exploration - Side-view action platformers - Character-action combat with sprite animation - Lightweight management or deck-driven battle scenes ## Camera and Presentation - Choose the camera model early: locked, follow, room-based, or tactical-pan. - Keep camera logic separate from game rules. - Use restrained screen shake, hit-stop, and parallax. Effects should improve readability, not obscure it. ## UI Integration - Use DOM overlays for HUD, command menus, settings, and narrative panels. - Keep the canvas responsible for the world, combat readability, and motion. - Avoid shoving dense text or complex settings UIs into Phaser unless the project explicitly needs an in-canvas presentation. ## Asset Organization - `characters/` - `environment/` - `ui/` - `fx/` - `audio/` - `data/` Keep manifest keys human-readable and stable. ## Default Directory Shape See `../../references/phaser-architecture.md` for a concrete module split. ## Anti-Patterns - Game rules inside `update()` loops without a system boundary - Scene-to-scene state passed through mutable global objects - HUD text rendered in the game canvas just because it is convenient - Asset paths embedded everywhere instead of a manifest layer - Overusing generic React dashboard patterns for game UI ## References - Shared architecture: `../web-game-foundations/SKILL.md` - Frontend direction: `../game-ui-frontend/SKILL.md` - Sprite workflow: `../sprite-pipeline/SKILL.md` - Phaser structure: `../../references/phaser-architecture.md`
© OpenAI · MIT · openai/plugins