Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

threejs-gameplay-systems — Claude Code skill: setup and overview

Scaffolds and tunes playable Three.js browser games with Vite and TypeScript. Helps design core loops, handle input, camera motion, and Rapier physics.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add majidmanzarpour/threejs-game-skills --skill threejs-gameplay-systems -a claude-code
Open on GitHub

What threejs-gameplay-systems does

The skill sets up browser game architectures using Vite, TypeScript, and Three.js modules. It starts projects via create_threejs_game.py, partitioning code into core, entities, systems, and ui. Work begins with design artifacts: a design brief, a core loop contract, and an encounter plan.

Runtime tuning relies on lil-gui and Web Audio events. When a game requires simulation and character controllers, the skill defaults to Rapier for physics. Gameplay randomness routes through a seeded RNG, so deterministic visual tests remain reproducible across runs.

What it helps with

  • scaffold a Three.js game project with Vite and TypeScript
  • define and verify a core gameplay loop contract
  • integrate Rapier physics and collision handling
  • tune camera feel, hitstop, and impact feedback

Example prompts for the agent

  • Scaffold a new Three.js action game using create_threejs_game.py
  • Help me write the core loop contract and design brief for a wave survival game
  • Configure Rapier physics and tune character controller movement

How to install threejs-gameplay-systems

1Skills CLI (Vercel)

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

2Manually: put the files in place

~/.claude/skills/threejs-gameplay-systems/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/threejs-gameplay-systems/

From the same set4

The whole set →

Similar

survival-crafting gamedev-skills A playbook for survival games: the gather, craft and build loop, hunger and thirst, tool tiers. Comes with pseudocode for the core systems and the knobs that keep the loop from turning into a grind. Claude Code CX Codex Cursor +1 5,700installs godot-csharp gamedev-skills Skill for writing Godot 4.7 games in C# with partial classes, lifecycle methods, Export attributes, signals as C# events, and GDScript interop. Requires Godot .NET build and .NET SDK 8+. Claude Code CX Codex Cursor +1 5,600installs godot-multiplayer gamedev-skills Configures Godot 4.7 high-level multiplayer via ENet, @rpc calls, node authority, and state replication with MultiplayerSpawner and MultiplayerSynchronizer. Claude Code CX Codex Cursor +1 5,600installs threejs-gltf-loading gamedev-skills Loads glTF/GLB models into three.js and plays their baked or skinned clips, with patterns for DRACO, Meshopt and KTX2. For the case where the file imports but nothing shows up on screen. Claude Code CX Codex Cursor +1 5,400installs unity-physics gamedev-skills Sets up 3D PhysX physics in Unity 6.3 LTS with proper Rigidbody motion, collision layers, and raycasts. Useful when writing character controllers or tuning physics interactions. Claude Code CX Codex Cursor +1 5,400installs unity-input-system gamedev-skills A Claude Code skill that wires player input in Unity 6.3 LTS with the Input System package: action maps, PlayerInput, values read in C#. Claude Code CX Codex Cursor +1 5,400installs orbit-card heygen-com Adds a 10-second 1920×1080 HyperFrames motion block where a single feature card orbits a dot sphere using exported Blender camera paths. Claude Code CX Codex Cursor +1 9,800installs sdf earthtojake This skill authors and validates SDFormat files for models and worlds, then helps prepare them for simulator handoff. Claude Code CX Codex Cursor +1 10,500installs

Questions about threejs-gameplay-systems

How to install threejs-gameplay-systems in Claude Code?

Run npx skills add majidmanzarpour/threejs-game-skills --skill threejs-gameplay-systems -a claude-code.

What does threejs-gameplay-systems do?

It guides the creation of Three.js browser games, enforcing clear system boundaries, responsive controls, physics integration, and game feel tuning.

What physics engine does the skill use?

It defaults to Rapier when the game requires physical simulation and collision handling.

Source text

SKILL.md · MIT
---
name: threejs-gameplay-systems
description: "Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring, objectives, and game feel. Use for first playable slices, new Vite/TypeScript/Three.js setups, level/arena/track/wave/hole/puzzle design, combat encounters, difficulty tuning, and juice."
---

# Three.js Gameplay Systems

Create or evolve a playable browser game loop with clear ownership, responsive controls, deterministic update order, and a space that shapes player decisions.

Resolve `<this-skill-dir>` and local references from the actual loaded skill file; resolve sibling skills beside it before using runner-discovered alternatives.

## References

| File | Read it when |
| --- | --- |
| `references/game-feel.md` | tuning feel, juice, impact, hitstop, screenshake, or claiming polished gameplay |
| `references/genre-design.md` | designing levels, arenas, tracks, waves, holes, puzzles, encounters, or difficulty curves |
| `references/physics-engine-selection.md` | adding or changing physics, collision-heavy gameplay, vehicles, rolling balls, character controllers, sensors, moving platforms |

## Start here

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

Copies `assets/threejs-vite-game/`, rewrites the project name, and gives the game its own visual test and canvas inspector. `--force` copies into a non-empty directory, overwriting files that collide with the scaffold and leaving everything else in place.

## Design first

For broad game creation or a substantial design change, write three short artifacts or update the existing ones. A narrow mechanic fix uses the existing design and preserves unrelated systems:

**Design brief.** Player promise (the fantasy in one sentence) · target feeling · primary verb · secondary verbs · what the player repeats every 5–30 seconds · what changes across 1–5 minutes · how they lose, learn, and restart · what is rewarded and what creates risk · what a better player does differently · how the next decision is communicated · non-goals for this slice.

**Core loop contract.** `Player does [verb] to achieve [objective] while [pressure] creates risk; success gives [reward], failure causes [cost/retry].` Then prove each clause in code: the verb is mapped to real input, the objective is visible in world or HUD, pressure exists inside the first playable minute, reward changes state rather than only visuals, failure teaches what happened, and restart is fast enough to invite another attempt.

**Level or encounter plan.** Spatial format · what the camera can and cannot see · player start, first decision, first threat, first reward · landmarks · how challenge escalates every 20–60 seconds or per wave/hole/lap · recovery beats · how hazards are telegraphed · which pieces are modular or parameterized.

"Explore a cool scene" is not a design brief. A brief needs decisions, pressure, feedback, and consequence.

## Build

1. Inspect existing structure, scripts, dependencies, loop, input, camera, entities, state, UI, diagnostics.
2. Keep small ownership boundaries: `core`, `game`, `entities`, `systems`, `assets`, `ui`, `tests`.
3. Implement in playable increments — input, state, entity, collision, feedback, HUD and audio hooks, diagnostics — so something is playable at every step.
   Establish one representative encounter at the intended camera scale with the actual hero and feedback before expanding content. Enemy, reward, and prop variety should serve the genre's decisions, not a universal asset quota.
4. Tune feel: movement, acceleration, camera follow and FOV, hitstop, impact feedback, cooldowns, difficulty, restart.
5. Keep hot paths allocation-light and update order explicit.
6. Route all gameplay randomness through the scaffold's seeded RNG so the deterministic test hooks keep working.

For coordinated work, define input intents, entity/asset interfaces, and events before delegating independent modules. Report changed behavior and local checks to the lead, who owns the consolidated browser pass. When a user changes requirements, update the existing brief and pending tasks instead of restarting completed work.

Gameplay code emits audio events; `threejs-audio-generator` produces the actual assets and the runtime audio matrix.

## Stack

TypeScript, Vite, Three.js modules, `three/addons/...` for official controls, loaders, and post-processing. `lil-gui` for live-tuned constants. Web Audio for runtime playback. Physics engine choice, timestep, and collider strategy follow `references/physics-engine-selection.md` — Rapier by default when the game needs real simulation.

## What goes wrong

A static demo instead of a playable loop · mechanics bolted onto a scene that was built first · a core loop described but never proven through real input, pressure, reward, and fail/retry · a track or arena that decorates rather than shapes decisions · a mechanic that compiles but no input can trigger · camera and controls that lag or hide the next decision · state changes that never reach UI, audio, or VFX · abstractions built before any mechanic needed them.

## Report

Behavior and controls, the three design artifacts for broad builds, architecture choices and tuned values, changed files, and what you saw when you played it. Note the physics engine, timestep, and collider strategy when physics is in scope.

© majidmanzarpour · MIT · majidmanzarpour/threejs-game-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor