Claude of Duty is a first-person shooter built in the browser with Three.js and WebGL2.
The project demonstrates procedural generation at scale: every texture, mesh, animation, and sound is generated at load time from code, with no art assets, model files, or audio files included. The game spans eleven subsystems covering rendering, materials, physics, weapons, AI, and audio synthesis. The rendering pipeline includes HDR processing, cascaded shadow maps, global ambient occlusion, temporal anti-aliasing, and bloom. The materials system generates nineteen procedural surface types with seamless tiling. Physics is implemented from scratch with a binned-SAH BVH for collision detection, swept-capsule character control, and ragdoll simulation. Weapons feature procedural geometry, ballistics with travel time and drop, and spring-based recoil. The audio system uses Web Audio synthesis for layered weapon fire, convolution reverb, and spatial audio. The world is a roughly 120×120 meter market street with modular buildings, enterable interiors, and hundreds of instanced props.
This project suits developers interested in procedural content generation, real-time graphics techniques, or browser-based game development. It is not a game engine or framework for building other games, but rather a complete, playable game that demonstrates what can be built procedurally in the browser. The codebase is organized around an architecture contract that defines subsystem interfaces, directory ownership, and cross-subsystem event vocabulary, making it a reference for coordinating large AI-generated codebases.
The development approach included a tooling harness for reproducible visual testing: screenshot capture via headless Chromium, per-pixel image diffing to detect any pixel movement, and a frame-time profiler that attributes hitches to specific WebGL programs. The project discovered that reproducible capture requires each shot in an isolated page with a fixed frame budget to achieve bit-identical results across runs. The profiler revealed frame-time distribution and hitch sources by counting WebGL programs per frame, findings that invalidated earlier performance measurements.