PluginBench
Skill
Pass
Audit score 90

threejs-gameplay-systems

majidmanzarpour/threejs-game-skills

Build playable Three.js game systems with design briefs, core loops, physics, and tuning for browser games.

What is threejs-gameplay-systems?

A skill for creating or evolving browser-based games in Three.js with TypeScript and Vite. Use it to scaffold new projects, design game mechanics with clear ownership boundaries, implement core loops with input/collision/physics, and tune game feel through iterative playtesting.

  • Scaffold new Three.js/Vite/TypeScript game projects with starter architecture and visual test canvas
  • Design game systems using design briefs, core loop contracts, and level/encounter plans
  • Implement deterministic game loops with explicit update order and seeded RNG for reproducible testing
  • Handle input mapping, camera control, entity management, collision detection, and physics integration
  • Tune game feel through hitstop, screenshake, impact feedback, difficulty curves, and juice
  • Route gameplay randomness and audio events through centralized systems for coordinated work

How to install threejs-gameplay-systems

npx skills add https://github.com/majidmanzarpour/threejs-game-skills --skill threejs-gameplay-systems
Prerequisites
  • Node.js and npm or equivalent package manager
  • Python 3 (for the scaffold creation script)
  • Basic familiarity with TypeScript and Three.js
Claude Code
Cursor
Windsurf
Cline

How to use threejs-gameplay-systems

  1. 1.Run the scaffold script: `python3 <skill-dir>/scripts/create_threejs_game.py ./my-game` to create a new project
  2. 2.Write or update the design brief, core loop contract, and level/encounter plan before building
  3. 3.Inspect the existing project structure, scripts, dependencies, and game loop
  4. 4.Implement gameplay in small increments: input, state, entity, collision, feedback, HUD, diagnostics
  5. 5.Keep ownership boundaries clear across core, game, entities, systems, assets, ui, and tests modules
  6. 6.Tune game feel by adjusting movement, camera, hitstop, impact feedback, cooldowns, and difficulty
  7. 7.Use lil-gui for live-tuned constants and the seeded RNG for deterministic testing
  8. 8.Report behavior, controls, design artifacts, architecture choices, and tuned values when complete

Use cases

Good for
  • Building a first playable slice or vertical slice for a new game concept
  • Setting up a new Vite/Three.js project with pre-configured architecture and diagnostics
  • Designing and iterating on level layouts, arenas, tracks, waves, or puzzle encounters
  • Implementing combat encounters with collision, physics, and difficulty tuning
  • Tuning movement feel, camera responsiveness, and feedback for polished gameplay
Who it's for
  • Game developers building browser-based games with Three.js
  • Teams prototyping game mechanics and iterating on design
  • Developers new to Three.js gameplay architecture who need scaffolding and patterns
  • Game designers working with developers to implement and tune game feel

threejs-gameplay-systems FAQ

What physics engine does this skill use?

Rapier by default when real physics simulation is needed; see references/physics-engine-selection.md for alternatives and configuration.

How do I handle audio in my game?

Gameplay code emits audio events; use the threejs-audio-generator skill to produce actual assets and runtime audio matrix integration.

Can I use this skill for multiplayer or networked games?

The skill provides core architecture and patterns; networking is not built-in but the design emphasizes defined input intents and entity interfaces to support coordinated team development.

What should I do if my game feels unresponsive or sluggish?

Check the game feel reference for tuning movement acceleration, camera follow/FOV, hitstop, and impact feedback; use lil-gui to live-tune constants and measure frame timing.

How do I ensure my game loop stays deterministic for testing?

Route all gameplay randomness through the scaffold's seeded RNG and keep the update order explicit; the test hooks will then reproduce behavior consistently.

Full instructions (SKILL.md)

Source of truth, from majidmanzarpour/threejs-game-skills.


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

FileRead it when
references/game-feel.mdtuning feel, juice, impact, hitstop, screenshake, or claiming polished gameplay
references/genre-design.mddesigning levels, arenas, tracks, waves, holes, puzzles, encounters, or difficulty curves
references/physics-engine-selection.mdadding or changing physics, collision-heavy gameplay, vehicles, rolling balls, character controllers, sensors, moving platforms

Start here

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.