GitHub - mshumer/Claude-of-Duty: A Call of Duty-quality FPS in Three.js, built from a single prompt.

Open original

This project is a first-person shooter running in the browser on Three.js and WebGL2, with all textures, meshes, animations, and sounds generated procedurally at load time by orchestrated AI agents. It outlines 11 core subsystems, a suite of automated capture and profiling tools, and an optimization pass that removed mid-frame shader compiles, doubled frame rates, and achieved bit-identical rendering across test shots. A blind critic comparison against Call of Duty highlights remaining gaps in materials, lighting, and performance.

  • An entire FPS game—every texture, mesh, animation, and sound—was generated procedurally by AI agents with zero art or audio files, totaling 55,000 lines of code.
  • A shader pre-warm pass fixed lazy-compile stalls, taking frame rates from an unplayable 12–17 fps to 28–30 fps and cutting boot time from ~10s to ~4s with zero visual change (verified by pixel-diff testing).
  • Despite matching Call of Duty's engine complexity (HDR pipeline, GTAO, TAA, cascaded shadows, etc.), blind critics scored it only 3.6–5.0/10 due to blocky hands, mannequin-like enemies, and lack of real global illumination.
  • Switching from parallel AI teams to a single-owner pass improved the critic score by +1.00 and halved defects, showing coordination overhead—not raw capability—was a major bottleneck.

A browser-based first-person shooter called Claude-of-Duty packs 55,000 lines of code across 11 subsystems into a procedural-content pipeline. There are zero art or audio files. Every texture, mesh, animation and sound runs off code at load time. Three.js r180 and WebGL2 drive the HDR pipeline, cascaded shadow maps, MRT prepass, GTAO, TAA, motion blur, bloom, plus 19 procedural materials—concrete, wood, metal, glass—tiled with noise, parallax occlusion and triplanar mapping. Atmospheric scattering, time-of-day sky, volumetric fog, a modular market street world, custom physics (BVH raycasts, swept-capsule controller, ragdolls, bullet penetration) and full Web Audio synthesis fill out the feature list. The repo’s real highlight is its test harness. Eleven scripts handle headless screenshot capture, bit-identical baseline runs, per-pixel diff gating, frame-time profiling and scripted playtests. Initial benchmarks on an Apple Silicon laptop at Retina DPR showed unplayable 12–17 fps with 728–1236 ms stalls from lazy shader compiles. After adding a shader pre-warm pass and fixing timing bugs, p50 jumped to 28–30 fps, p99 to 14–17 fps, worst frame to 66–82 ms, and boot time fell from ~10 s to ~4 s, all with zero visual change verified by the diff tool. Despite engine-level parity with Call of Duty in pipeline complexity, critics scored it 3.6–5.0 out of 10. Two shots hit “close,” the rest stayed “amateur.” They pointed to blocky hands, procedural-noise surfaces, mannequin-like enemies, lack of real global illumination and capped material separation (viewmodel albedo cut to one-third to offset an over-bright F0 cheat). Parallel AI teams tripped over cross-subsystem tone mapping and lighting. A single-owner pass boosted score by +1.00 and halved defects. Ironically, fixing specular-dominated weapons meant increasing diffuse albedo—not crushing it further.

Ask about this article