Claude-of-Duty logo

Claude-of-Duty

A Call of Duty-quality FPS in Three.js, built from a single prompt.

Developer ToolsJavaScriptMIT 2.3k 334Health 90
GitHub

What is it?

What it is

A browser-based first-person shooter built with Three.js r180 and WebGL2, where all textures, meshes, animations, and sounds are generated procedurally at runtime, consisting of ~55k lines across 11 subsystems.

Why it exists

To showcase procedural content generation, provide a harness for reproducible performance testing and optimization, and demonstrate AI-agent orchestrated development of a complex game.

Who should use it

Graphics engineers interested in procedural generationWebGL/Three.js developers studying advanced rendering pipelinesAI researchers studying multi-agent software orchestrationGame developers exploring asset-less procedural workflowsPerformance engineers studying GPU-backed testing harnesses

Who should avoid it

Developers looking for high-fidelity AAA-quality art assetsUsers with low-end hardware expecting high frame ratesBeginners looking for a simple 'how-to' starter project

How it works

A quick walkthrough in plain English

How Claude-of-Duty works

Step 1 of 3

You interact with it

Open Claude-of-Duty, send a request, or connect it to your stack.

Features

Procedurally generated textures, meshes, animations, and sounds with no external art assets
Three.js r180 and WebGL2 rendering pipeline with HDR, cascaded shadow maps, and MRT depth/normal/velocity prepass
Advanced post‑processing: GTAO, TAA with YCoCg variance clipping, tile‑dilated motion blur, Karis bloom pyramid, GPU EV100 metering
Procedural material system with 19 surface types, periodic noise, Sobel height→normal, parallax occlusion mapping, triplanar projection
Atmospheric scattering, time‑of‑day sky, PMREM environment generation, volumetric fog and light shafts
Modular 120×120 m market street with enterable interiors and instanced props
Custom physics engine: BVH, swept‑capsule controller, CCD, PBD ragdolls, multi‑layer bullet penetration
Procedural weapon geometry, viewmodel rig, ADS, spring recoil, ballistics with drop and travel time
GPU‑based particles, decals, tracers, muzzle flash, explosions
Skinned AI soldiers with navmesh pathing, perception, cover behaviour, ragdoll death
Web Audio synthesis with layered weapon fire, convolution reverb, HRTF spatialisation, occlusion
Reproducible headless capture tooling (baseline, shotset, imagediff)
Real‑time gameplay profiling and hitch attribution
Zero visual change optimization via shader pre‑warm and deterministic timing
Open‑source MIT license with a single‑dependency runtime (Three.js)

Advantages

  • Boot time reduced from ~10 s to ~4 s after shader pre‑warm
  • Frame‑rate improved from 12–17 fps to 28–30 fps at Retina DPR
  • Shader compilation stalls eliminated (0 compiles during play)
  • Worst frame time reduced from >1 s to <0.1 s
  • Reproducible image captures enable pixel‑perfect regression testing
  • Procedural generation removes need for external art assets, reducing repo size
  • Custom physics engine gives fine control over collision and ragdoll behaviour
  • Open‑source codebase allows community contributions and transparency
  • Tooling provides automated playtesting and profiling

Disadvantages

  • Limited lighting consistency (viewmodel light rig over‑illuminates view models)
  • Lack of real GI reduces depth and realism
  • High memory usage for procedural assets on low‑end devices
  • Potential for visual artifacts when changing engine clock vs performance.now()
  • Complex build process for reproducible captures
  • No support for external art pipelines
  • Difficulty in achieving high fidelity hand animations
  • Limited community support compared to larger engines

Installation

native

npm install
npm run dev

FAQ

Does the game use any external art or audio files?

No. Every texture, mesh, animation, and sound is generated procedurally at load time from code. There are no models, HDRIs, image files, or audio files used in the project.

How do I run the project locally?

You can get started by running `npm install` followed by `npm run dev`. The game will then be available at http://127.0.0.1:5173.

What are the primary controls for gameplay?

Use WASD to move, the mouse to aim, LMB to fire, and RMB for ADS. Other controls include R for reload, Shift to sprint, Ctrl to crouch, Space to jump, Q/E to lean, and Esc to release the cursor.

How does the project handle performance profiling and testing?

The repository includes a suite of specialized tools: `profile.mjs` for frame-time distribution and hitch attribution, `baseline.mjs` for bit-identical reproducible captures, and `playtest.mjs` for scripted movement and fire smoke tests.

What is the main technical dependency for the engine?

The only runtime dependency for the game is `three` (Three.js), which is used alongside WebGL2 for rendering.

Loading documentation…
View on GitHub

Featured in Videos

YouTube tutorials and walkthroughs for Claude-of-Duty

Alternatives

Similar projects ranked by category, topics, and text overlap.

Compare
Claude-of-Duty | MushyBook