Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

game

БесплатноЗапускает вложенные скриптыНе проверен

Autonomous browser game agent. Analyzes game concept, implements with KAPLAY.js (2D) or Three.js (3D), playtests in headless browser, critiques…

tolitiusот tolitius★ 16 звёзд на GitHub15 установок в других каталогах

Об этом скилле

Game Agent

Use this skill to create browser-based games using KAPLAY.js (2D) or Three.js (3D) with a focus on playable mechanics, clear feedback, and polished feel.

Workflow

Follow this strict loop when asked to create a game:

Phase 1: Bootstrap

  1. Check Context: If package.json is missing, run bash .claude/skills/game/scripts/setup.sh.
  2. Scaffold: Ensure index.html and src/game.js exist (or inline in index.html).
  3. Read API Reference:
    • For 2D games: Read references/kaplay-ref.md for KAPLAY API.
    • For 3D games: Read references/threejs-ref.md for Three.js API.
    • For FPS games: Read references/fps-patterns.md for pointer lock, hit detection, enemy AI.
  4. Read Game Patterns: Read references/game-patterns.md for architecture patterns.
  5. Read Game Systems: Read references/game-systems.md for difficulty scaling, scoring, persistence, and UI patterns.
  6. Read Visual Assets: Read references/visual-assets.md for procedural sprites, palettes, and visual effects.

Phase 1.5: Game Design Analysis (Before Coding!)

This game needs to be playable and fun from the first iteration. Therefore, define the core loop before writing any code.

Before writing any code, decompose the game:

  1. Identify the Core Mechanic: What is the ONE thing the player does repeatedly?

    • Strip away everything else first
    • This mechanic must be satisfying on its own
    • Examples: jump, shoot, match, dodge, collect, solve
  2. Define the Challenge: What makes it difficult?

    • Timing? Precision? Resource management? Puzzle solving?
    • How does difficulty progress?
    • What's the failure state?
  3. Establish the Feedback Loop:

    • Input: What does the player press/click/drag?
    • Response: What happens immediately? (must feel < 100ms)
    • Outcome: Success or failure indication
    • Reward/Penalty: Score change, sound, visual effect
  4. Scope to Minimum Viable Game (MVG):

    • ONE level or endless mode
    • ONE enemy type or obstacle
    • ONE player ability
    • Win AND lose conditions
    • Can be expanded later, but MVG must work first
  5. Research the Domain (for educational/simulation games):

    • Look up actual facts (angles, counts, formulas, rules)
    • Don't guess scientific/mathematical details
    • See references/physics-constants.md for common values

Phase 1.6: Game Feel Principles

  1. Juice: The game must feel alive and responsive.

    • Input Response: Every input produces immediate visual/audio feedback
    • Screen Shake: On impacts, collisions, explosions - use shake(intensity)
    • Flash: Brief color flash on damage or success - use flash(color, duration)
    • Particles: On deaths, pickups, actions (spawn small objects with lifespan)
    • Squash & Stretch: Scale objects on jumps, bounces, movements
  2. Clarity: The player must always understand:

    • Where they are (player position obvious, distinct color/shape)
    • What they can do (affordances clear)
    • What hurts them (dangers visually distinct - red, spiky, animated)
    • What helps them (pickups/goals highlighted - gold, glowing, animated)
    • Current state (score, lives, progress visible in HUD)
  3. Pacing: Control the rhythm

    • Moments of tension followed by release
    • Difficulty curves, not walls
    • Rest points between challenges
    • Even endless games need rhythm variation (spawn rate waves)
  4. Polish Details:

    • Title/start screen with game name and controls
    • Pause functionality (P key or Escape)
    • Restart on game over (R key)
    • Score or progress display (top-left, fixed() for HUD)
    • Control hints visible ("Arrow keys: Move | Space: Jump")

Phase 1.7: Physics & Reachability Validation

CRITICAL: Validate that game physics allow the player to accomplish required actions.

  1. Test Core Movement: Before finalizing level/game design:

    • Can the player reach all required locations?
    • Can the player avoid all avoidable hazards?
    • Does movement feel responsive (not sluggish or twitchy)?
    • Are speeds balanced (player vs enemies vs projectiles)?
  2. Validate With Math: For physics-based games, calculate limits:

    • Movement range per second = speed × time
    • Jump/launch height = (force)² / (2 × gravity)
    • Projectile range = speed × lifetime
    • If design requires X, verify physics allow X
  3. Common Physics Pitfalls:

    • Targets placed beyond movement range
    • Gaps larger than jump/dash distance
    • Enemies faster than player can react
    • Timers shorter than required actions
    • Always prototype movement before building levels

Phase 1.8: Visual Polish (Before Coding!)

CRITICAL: Games must look polished from the first iteration. No "sticks and boxes."

Quality Bar: Ask yourself - "Would someone pay $5 for this?" If not, it's not ready.

  1. Choose a Color Palette: Select from `visual-assets.
Полный SKILL.md на GitHub

Установить game в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/fps-patterns.mdreferences/game-patterns.mdreferences/game-systems.mdreferences/kaplay-ref.mdreferences/physics-constants.mdreferences/threejs-ref.mdreferences/visual-assets.mdscripts/playtest.jsscripts/setup.shtemplates/canvas-minimal.htmltemplates/kaplay-2d.htmltemplates/threejs-3d.htmltemplates/threejs-fps.html

FAQ

Что делает скилл game?

Autonomous browser game agent. Analyzes game concept, implements with KAPLAY.js (2D) or Three.js (3D), playtests in headless browser, critiques gameplay/mechanics, fixes, and launches the result.

Как установить скилл game?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл game запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить game с