Skip to content
cccskills
FreePublished on GitHub

threejs-gameplay-systems

Design and build playable browser game systems with Three.js, from a starter project and core loop to controls, camera, collisions, levels, scoring, and difficulty. Work in playable increments, with clear design plans and feedback tuned around the decisions players make.

OriginalShow the original 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.

Run score Not tested

See how to install

Good for

  • Set up a Vite, TypeScript, and Three.js game project
  • Design a level, arena, track, wave, or puzzle
  • Build and tune a playable combat or gameplay loop

Files included (33)

  • SKILL.md5.4 KB
  • agents/openai.yaml244 B
  • assets/threejs-vite-game/.gitignore61 B
  • assets/threejs-vite-game/index.html1.1 KB
  • assets/threejs-vite-game/package-lock.json33.2 KB
  • assets/threejs-vite-game/package.json692 B
  • assets/threejs-vite-game/playwright.config.ts1.7 KB
  • assets/threejs-vite-game/scripts/inspect-threejs-canvas.mjs24.2 KB
  • assets/threejs-vite-game/src/core/InputController.ts4.8 KB
  • assets/threejs-vite-game/src/core/Loop.ts800 B
  • assets/threejs-vite-game/src/core/Renderer.ts1.2 KB
  • assets/threejs-vite-game/src/entities/Pickup.ts1.8 KB
  • assets/threejs-vite-game/src/entities/Player.ts2.7 KB
  • assets/threejs-vite-game/src/game/Game.ts11.2 KB
  • assets/threejs-vite-game/src/main.ts336 B
  • assets/threejs-vite-game/src/styles.css2.8 KB
  • assets/threejs-vite-game/src/systems/AudioSystem.ts1.6 KB
  • assets/threejs-vite-game/src/systems/CameraRig.ts940 B
  • assets/threejs-vite-game/src/systems/CollisionSystem.ts669 B
  • assets/threejs-vite-game/src/systems/DebugTools.ts1023 B
  • assets/threejs-vite-game/src/systems/Hud.ts1.4 KB
  • assets/threejs-vite-game/src/utils/dispose.ts870 B
  • assets/threejs-vite-game/src/utils/random.ts549 B
  • assets/threejs-vite-game/src/vite-env.d.ts1.3 KB
  • assets/threejs-vite-game/tests/bot-playtest.template.ts5.0 KB
  • assets/threejs-vite-game/tests/visual-regression.template.ts2.8 KB
  • assets/threejs-vite-game/tests/visual.spec.ts3.0 KB
  • assets/threejs-vite-game/tsconfig.json479 B
  • assets/threejs-vite-game/vite.config.ts298 B
  • references/game-feel.md12.6 KB
  • references/genre-design.md3.9 KB
  • references/physics-engine-selection.md4.4 KB
  • scripts/create_threejs_game.py2.5 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Create 3D assets for Three.js games through the Tripo API, from text or image input. The workflow can add textures, rigs, and animations, convert formats, and prepare models such as characters, creatures, buildings, props, and terrain for game use.

  • Generating a game model from a text prompt
  • Turning a concept image into a 3D asset
  • Rigging and animating a character or creature
majidmanzarpour/threejs-game-skills2.6KUpdated Sep 28, 2026

Improve the visual quality of Three.js browser games by reviewing screenshots, shaping models and materials, and refining lighting, effects, and rendering. A 10-category scorecard helps track visual gaps while render budgets guide performance choices.

  • Reviewing screenshots to find the weakest visual areas
  • Building procedural models, materials, and world props
  • Adding shaders, lighting, and gameplay effects
majidmanzarpour/threejs-game-skills2.6KUpdated Sep 28, 2026

Create and process sound effects, music, ambience, and voice lines for Three.js browser games using ElevenLabs. The skill also prepares audio files and manifests, then connects playback through Web Audio for loading, looping, volume control, and pause or resume.

  • Creating sound effects and ambience for game events
  • Making looping menu or gameplay music
  • Generating announcer lines or dialogue with text to speech
majidmanzarpour/threejs-game-skills2.6KUpdated Sep 28, 2026

Find and fix problems in Three.js browser games, such as blank canvases, loading failures, animation, resizing, and mobile input. Measure rendering, memory, shader, network, and bundle costs to locate performance bottlenecks and compare results after changes.

  • Investigate a blank game canvas or runtime error
  • Debug asset, audio, animation, or mobile input issues
  • Measure game performance before and after an optimization
majidmanzarpour/threejs-game-skills2.6KUpdated Sep 28, 2026

Coordinate the work needed to build or improve a Three.js browser game, from gameplay and visuals to interface, assets, debugging, and release checks. It helps shape the work to the requested scope, whether that is a small arcade prototype or a polished release.

  • Planning a small browser game
  • Improving gameplay and visuals
  • Coordinating assets, UI, and debugging
majidmanzarpour/threejs-game-skills2.6KUpdated Sep 28, 2026

Design readable, responsive interfaces for Three.js games, including HUDs, menus, overlays, settings, and touch controls. Plan game states, connect UI to game state, and check text fit, safe areas, overlap, and interaction on target screen sizes.

  • Design a HUD and menus for a Three.js game
  • Adapt game UI for mobile screens and touch input
  • Review text fit and overlap across game states
majidmanzarpour/threejs-game-skills2.6KUpdated Sep 28, 2026

See all skills by majidmanzarpour

Report a problem with this skill