New to Claude Skills? Learn how to install them →

majidmanzarpour on GitHub

Three.js Gameplay Systems

Free

Rapidly develop interactive browser games with Three.js.

Get this skill

Free · Opens the source repo

What Three.js Gameplay Systems does

The Three.js Gameplay Systems skill provides a comprehensive framework for creating and iterating browser-based games using Three.js. It combines essential components such as game design architecture, mechanics implementation, and gameplay feel tuning, making it suitable for developers looking to build playable game prototypes or complete projects. The skill emphasizes a structured approach, guiding users through the process of defining game loops, player interactions, and level designs while ensuring that the resulting gameplay is engaging and responsive.

This skill is particularly beneficial for developers who are starting new game projects or need to enhance existing prototypes. It includes a scaffold for setting up a new game using Vite and TypeScript, along with a series of reference documents that help in planning and executing various aspects of game development. From defining core gameplay mechanics to fine-tuning the player's experience through feedback and visual effects, this skill covers a wide range of game development needs.

The workflow outlined in the skill encourages a methodical approach to game development. Users are prompted to load specific reference documents at various stages to ensure that important design principles are adhered to. This structured methodology helps in avoiding common pitfalls that can lead to subpar gameplay experiences, such as static mechanics or poorly designed levels. By following the provided guidelines, developers can create games that not only function well but also provide a satisfying experience for players.

Overall, the Three.js Gameplay Systems skill is an invaluable tool for game developers and designers who want to streamline their development process and create high-quality, interactive games. Its focus on best practices and structured workflows makes it a reliable choice for both novice and experienced developers looking to leverage the power of Three.js in their projects.

When to use it

Use this skill when starting a new game project or when enhancing an existing prototype that requires structured gameplay mechanics and design.

When not to use it

This skill may not be suitable for developers looking for a quick, non-iterative approach to game development or those not using Three.js.

What you can build with it

Starting a New Game Project

Use the skill to set up a new Three.js game project with a structured scaffold and design references.

Enhancing an Existing Prototype

Apply the skill to improve gameplay mechanics and player experience in an existing game prototype.

Defining Game Design Briefs

Leverage the skill to create clear design briefs that outline player objectives and game feel.

How to install Three.js Gameplay Systems

View source

1. Install with the skills CLI

npx skills add majidmanzarpour/threejs-game-skills/threejs-gameplay-systems --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by majidmanzarpour

Three.js Gameplay Systems

Purpose

Create or evolve a playable browser game loop with clear ownership, responsive controls, deterministic update order, strong design intent, playable spaces, and verified player-facing behavior.

Use When

Starting a new game, repairing a weak prototype, adding mechanics/entities, designing architecture, defining a game design brief, planning levels/arenas/tracks/waves/holes/puzzles, tuning camera/controls, implementing rules/objectives, building encounters, or improving game feel.

Workflow

Load references/gameplay-workflows.md as the first action when the task includes first playable setup, architecture, mechanics, entities, input, camera, collision/physics, scoring, objectives, feedback, or feel tuning.

Load references/game-design-level-design.md before broad new-game creation, major gameplay changes, level/arena/track/wave/hole/puzzle design, combat/encounter design, progression/difficulty work, or any claim that gameplay is premium, polished, complete, or less generic.

Load references/physics-engine-selection.md before adding or changing physics, collision-heavy gameplay, vehicle movement, rolling balls, mini-golf, pool/snooker, pinball, rigid-body puzzles, character controllers, sensors, high-speed projectiles, moving platforms, or physics QA.

Load references/game-feel.md before feel/juice/impact tuning, or before claiming gameplay is premium or polished. Track every loaded reference in a reference ledger with yes/no, path, and failure reason. Do not mark the gameplay phase complete while a required reference is skipped.

Load references/checklists/new-game-definition-of-done.md before claiming a new game or first playable slice is complete.

Load references/checklists/game-design-level-design.md before claiming a new game, major gameplay upgrade, level/encounter pass, premium gameplay, or polished gameplay is complete.

Load references/checklists/game-feel.md before claiming feel/impact tuning or premium gameplay is complete.

Load references/checklists/endless-runner-premium-quality.md for endless runner work.

Load references/prompt-templates.md only when the user asks for reusable prompts, starter prompts, or a task template.

Load threejs-audio-generator when implementing real SFX, ambience, UI sounds, voice/TTS, or audio cleanup beyond simple placeholder hooks. Gameplay code should emit audio events; the audio skill should generate or process the actual assets and define the runtime audio matrix.

  1. Inspect project structure, scripts, dependencies, current loop, input, camera, entities, state, UI, and diagnostics.
  2. Write the compact game design brief: player promise, target feeling, primary verb, objective, pressure, reward, fail/retry, skill expression, non-goals.
  3. Define the core loop contract: verb, objective, pressure, reward/progression, fail/retry.
  4. Define the level/encounter plan before implementation: start, first decision, first threat, first reward, landmarks, escalation, recovery beats, readability, and tuning knobs.
  5. Choose small architecture boundaries: core, game, entities, systems, assets, ui, tests.
  6. Implement mechanics in playable increments: input, state, entity, collision/physics, feedback, HUD/audio hook, diagnostics.
  7. Tune feel with references/game-feel.md: movement, acceleration, camera follow/FOV/shake, hitstop, impact feedback, cooldowns, difficulty, restart loop.
  8. Keep hot paths allocation-light and update order explicit.
  9. Verify with build, browser, screenshot, canvas pixels, console/page errors, and one real input path.

Packaged Scaffold

Use the bundled scaffold when starting a new project or when the user asks for a starter game:

python3 <this-skill-dir>/scripts/create_threejs_game.py ./my-game

The script copies assets/threejs-vite-game/, rewrites the project name in package.json and package-lock.json, and keeps generated games self-contained with their own visual test and canvas-inspection script. Use --force only when the target directory may be overwritten.

Library Guidance

  • Use TypeScript, Vite, Three.js modules.
  • Physics/collision engine choice (custom collision vs Rapier vs cannon-es), timestep, and collider strategy: follow references/physics-engine-selection.md.
  • lil-gui for live-tuned constants when useful.
  • Web Audio for runtime playback and procedural feedback; threejs-audio-generator for generated game audio assets.

Common Failure Modes

  • Static demo instead of playable loop.
  • Static scene with mechanics bolted on after the fact, instead of a design brief plus level/encounter plan driving implementation.
  • Core loop is described but not proven through real input, pressure, reward/progression, and fail/retry.
  • Level/track/arena/map is decorative and does not shape player decisions.
  • Mechanic compiles but cannot be triggered by real input.
  • Camera/controls feel delayed or hide the next decision.
  • State changes do not drive UI/audio/VFX.
  • Architecture abstractions appear before mechanics need them.

Final Response

Report the reference ledger, game design brief, core loop contract, level/encounter plan, gameplay checklist outcome, behavior, controls, changed files, architecture choices, tuned values, verification evidence, artifacts, and remaining edge cases.

Frequently asked questions about Three.js Gameplay Systems

Similar skills