<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Procedural Generation on RockB</title><link>https://baeseokjae.github.io/tags/procedural-generation/</link><description>Recent content in Procedural Generation on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 28 Jul 2026 07:03:42 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/procedural-generation/index.xml" rel="self" type="application/rss+xml"/><item><title>Claude of Duty: Building a Call of Duty-Quality FPS from a Single Prompt</title><link>https://baeseokjae.github.io/posts/claude-of-duty-single-prompt-fps-2026/</link><pubDate>Tue, 28 Jul 2026 07:03:42 +0000</pubDate><guid>https://baeseokjae.github.io/posts/claude-of-duty-single-prompt-fps-2026/</guid><description>Claude of Duty generated 55,000 lines of Call of Duty-quality FPS code from a single AI prompt. Here is how it works, how it scores, and what it means for game development.</description><content:encoded><![CDATA[<h2 id="what-is-claude-of-duty--the-project-overview">What Is Claude of Duty? — The Project Overview</h2>
<p>Claude of Duty is an open-source project by Matt Shumer that generates a fully playable first-person shooter in the browser from a single AI prompt. Built entirely with Three.js r180 and WebGL2, the project produces approximately 55,000 lines of JavaScript across 11 coordinated subsystems — including rendering, physics, AI, weapons, audio, and UI — with zero external art assets, models, textures, or audio files. Every visual element is procedurally generated at load time.</p>
<p>Released on July 25, 2026, the project amassed over 1,084 GitHub stars and 210 forks within its first three days. The README is refreshingly honest: it scores itself 5.05 out of 10 against real Call of Duty and openly documents every shortcoming. This transparency, combined with the sheer technical ambition, has made Claude of Duty one of the most discussed AI game development projects of 2026.</p>
<h2 id="the-single-prompt-that-built-a-game--breaking-down-promptmd">The Single Prompt That Built a Game — Breaking Down prompt.md</h2>
<p>The entire game originates from a single markdown file: <code>prompt.md</code>. This prompt instructs the AI to fan out into multiple sub-agents, each responsible for a different subsystem, and to use harsh adversarial critics that compare every frame side-by-side with real Call of Duty footage.</p>
<h3 id="key-elements-of-the-prompt">Key Elements of the Prompt</h3>
<p>The prompt uses a <code>/loop</code> pattern for iterative improvement with visual quality checks. It tells the AI to:</p>
<ol>
<li><strong>Fan out sub-agents</strong> — Each subsystem (renderer, physics, AI, weapons, etc.) gets its own dedicated agent</li>
<li><strong>Use harsh critics</strong> — 11 adversarial AI critics score every frame against real Call of Duty</li>
<li><strong>Compare side-by-side</strong> — Blind A/B testing against actual CoD screenshots</li>
<li><strong>Iterate relentlessly</strong> — The loop continues until quality targets are met</li>
</ol>
<p>This structured approach to prompt engineering demonstrates that a well-crafted single prompt can orchestrate complex multi-agent code generation far more effectively than ad-hoc, uncoordinated prompting.</p>
<h2 id="11-subsystems-zero-art-assets--technical-architecture-deep-dive">11 Subsystems, Zero Art Assets — Technical Architecture Deep Dive</h2>
<p>Claude of Duty&rsquo;s architecture is defined by the OVERWATCH engine contract — a coordination mechanism that enforces strict rules across all 11 subsystems. Each subsystem owns its directory, must never import from another subsystem, and follows a standardized lifecycle: <code>init</code>, <code>fixedUpdate</code>, <code>update</code>, <code>lateUpdate</code>, <code>resize</code>, and <code>dispose</code>.</p>
<table>
  <thead>
      <tr>
          <th>Subsystem</th>
          <th>Responsibility</th>
          <th>Key Technical Detail</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Render</td>
          <td>HDR pipeline, CSM, TAA, bloom</td>
          <td>Full deferred rendering with temporal anti-aliasing</td>
      </tr>
      <tr>
          <td>Materials</td>
          <td>19 procedural PBR surfaces</td>
          <td>Concrete, brick, plaster, asphalt, sand, metals, wood, fabric, burlap, glass — all generated at load time</td>
      </tr>
      <tr>
          <td>Sky</td>
          <td>Atmospheric scattering</td>
          <td>Physically-based sky model with dynamic sun</td>
      </tr>
      <tr>
          <td>World</td>
          <td>120x120m market street</td>
          <td>Modular building kit with enterable interiors, hundreds of instanced props</td>
      </tr>
      <tr>
          <td>Physics</td>
          <td>BVH, swept-capsule, ragdolls</td>
          <td>Binned-SAH BVH: 29k triangles → 14k nodes in 22ms, 0.25 µs/raycast</td>
      </tr>
      <tr>
          <td>Player</td>
          <td>Movement state machine</td>
          <td>Full locomotion, sprint, slide, jump states</td>
      </tr>
      <tr>
          <td>Weapons</td>
          <td>Procedural geometry, ballistics</td>
          <td>Weapon models generated from code, physics-based projectile simulation</td>
      </tr>
      <tr>
          <td>FX</td>
          <td>GPU particles, decals</td>
          <td>Compute-shader particle systems, dynamic decal placement</td>
      </tr>
      <tr>
          <td>AI</td>
          <td>Navmesh, cover behavior</td>
          <td>Pathfinding with tactical cover selection</td>
      </tr>
      <tr>
          <td>UI</td>
          <td>DOM/CSS HUD</td>
          <td>Health, ammo, minimap rendered via HTML/CSS overlay</td>
      </tr>
      <tr>
          <td>Audio</td>
          <td>Web Audio synthesis</td>
          <td>All sound effects generated procedurally — no audio files</td>
      </tr>
  </tbody>
</table>
<p>The only runtime dependency is Three.js r180. There are no external images, models, HDRIs, or audio files. The triangle count grew from 5.9 million to 11.3 million over successive art passes.</p>
<h2 id="the-honest-score-50510-vs-call-of-duty--visual-quality-assessment">The Honest Score: 5.05/10 vs Call of Duty — Visual Quality Assessment</h2>
<p>Claude of Duty&rsquo;s most refreshing feature is its honest self-assessment. The project uses 11 adversarial AI critics to score every frame against real Call of Duty. The scoring progression tells a compelling story:</p>
<table>
  <thead>
      <tr>
          <th>Round</th>
          <th>Average Score (out of 10)</th>
          <th>Defects</th>
          <th>Key Change</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>1</td>
          <td>3.59</td>
          <td>66</td>
          <td>Initial generation</td>
      </tr>
      <tr>
          <td>2</td>
          <td>4.14</td>
          <td>—</td>
          <td>First optimization pass</td>
      </tr>
      <tr>
          <td>3</td>
          <td>4.05</td>
          <td>—</td>
          <td>Art pass</td>
      </tr>
      <tr>
          <td>4</td>
          <td>5.05</td>
          <td>26</td>
          <td>Sequential single-owner pass</td>
      </tr>
  </tbody>
</table>
<p>In every single round, every critic picked the real Call of Duty frame in blind A/B testing. The project acknowledges this honestly: &ldquo;critics always picked real CoD in blind A/B.&rdquo; The 5.05/10 score represents the critics&rsquo; assessment of how close Claude of Duty comes to matching CoD&rsquo;s quality, not a pass/fail threshold.</p>
<h3 id="key-visual-weaknesses">Key Visual Weaknesses</h3>
<ul>
<li><strong>Blocky hands</strong> — The viewmodel (player hands/weapon) lacks the geometric detail of AAA games</li>
<li><strong>Procedural texture ceiling</strong> — AI-generated textures, while impressive, cannot yet match photographed reality</li>
<li><strong>Mannequin-like characters</strong> — Enemy models lack the facial detail and animation fidelity of modern FPS games</li>
<li><strong>No real global illumination</strong> — Lighting relies on shadow mapping and screen-space effects rather than baked or real-time GI</li>
<li><strong>28-30 fps at Retina resolution</strong> — Performance is playable but far from the 60+ fps target of competitive shooters</li>
</ul>
<h2 id="performance-journey-from-12fps-to-30fps--optimization-case-study">Performance Journey: From 12fps to 30fps — Optimization Case Study</h2>
<p>The performance optimization story of Claude of Duty is as impressive as the game itself. Initial performance was 12-17 fps — barely playable. Through systematic optimization, the team achieved 28-30 fps with zero visual change.</p>
<h3 id="optimization-milestones">Optimization Milestones</h3>
<table>
  <thead>
      <tr>
          <th>Metric</th>
          <th>Before</th>
          <th>After</th>
          <th>Improvement</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Average FPS</td>
          <td>12-17</td>
          <td>28-30</td>
          <td>~2x</td>
      </tr>
      <tr>
          <td>Worst frame time</td>
          <td>728-1236ms</td>
          <td>66-82ms</td>
          <td>~12x</td>
      </tr>
      <tr>
          <td>Shader compiles during gameplay</td>
          <td>34-35</td>
          <td>0</td>
          <td>Eliminated</td>
      </tr>
      <tr>
          <td>Boot time</td>
          <td>9-12s</td>
          <td>3.7-4.6s</td>
          <td>~2.5x</td>
      </tr>
  </tbody>
</table>
<p>The single biggest win came from <code>prewarm.js</code> — a shader pre-warming script that eliminated all 34-35 shader compilations during gameplay. This reduced worst frame time from over a second to under 82ms. The lesson is clear: in WebGL applications, shader compilation stalling is the single largest source of perceived lag, and pre-warming is the most impactful optimization available.</p>
<h2 id="process-lessons-sequential-beats-parallel-for-ai-code-generation">Process Lessons: Sequential Beats Parallel for AI Code Generation</h2>
<p>One of the most surprising findings from Claude of Duty is about AI agent orchestration strategy. The project compared two approaches:</p>
<p><strong>Parallel fan-out:</strong> Multiple AI agents work simultaneously on different subsystems, then results are merged. This approach improved the critic score by +0.46 and left defects relatively high.</p>
<p><strong>Sequential single-owner passes:</strong> A single AI agent works through the entire codebase in sequence, making focused improvements one at a time. This approach improved the score by +1.00 and cut defects from 66 to 26.</p>
<p>The sequential approach was decisively better — nearly 2x the quality improvement with less than half the defects. This contradicts the common assumption that parallel processing is always faster for AI code generation. The likely explanation is that sequential passes maintain better context about the full codebase, avoiding the integration bugs and inconsistent design decisions that plague parallel work.</p>
<h2 id="the-viewmodel-lighting-bug--a-case-study-in-cascading-failures">The Viewmodel Lighting Bug — A Case Study in Cascading Failures</h2>
<p>One of the most instructive bugs in Claude of Duty&rsquo;s development was the viewmodel lighting bug. A single root cause — 20x irradiance on the viewmodel (the player&rsquo;s hands and weapon) — cascaded across the entire visual pipeline.</p>
<p>This bug is a perfect example of how subtle rendering errors can compound in complex systems. The viewmodel was receiving 20 times the correct lighting intensity, which:</p>
<ol>
<li>Made player hands and weapons appear blown out and unrealistic</li>
<li>Caused inconsistent lighting between the viewmodel and the world</li>
<li>Confused the adversarial critics, who correctly identified the lighting mismatch</li>
<li>Required tracing through the entire lighting pipeline to find the root cause</li>
</ol>
<p>The fix was simple once identified, but finding it required deep understanding of the full rendering chain. This case study underscores the importance of systematic debugging in AI-generated code — AI can produce complex systems, but understanding and debugging them still requires human expertise.</p>
<h2 id="tooling-and-reproducibility--baselinemjs-imagediffmjs-and-the-testing-pipeline">Tooling and Reproducibility — baseline.mjs, imagediff.mjs, and the Testing Pipeline</h2>
<p>Claude of Duty includes a sophisticated testing and reproducibility pipeline that is rare in AI-generated projects:</p>
<ul>
<li><strong>baseline.mjs</strong> — Captures reference frames for bit-identical comparison</li>
<li><strong>imagediff.mjs</strong> — Performs pixel-level visual regression testing against baselines</li>
<li><strong>Prewarm.js</strong> — Eliminates shader compilation stalling during gameplay</li>
</ul>
<p>This tooling enables reproducible testing across different runs and environments. When an optimization claims to improve performance without changing visuals, the imagediff tool can verify that claim objectively. This level of engineering rigor is unusual for a project that started as a single AI prompt and sets a standard for how AI-generated code should be validated.</p>
<h2 id="what-this-means-for-ai-game-development-in-2026">What This Means for AI Game Development in 2026</h2>
<p>Claude of Duty arrives at a pivotal moment for AI-assisted game development. Several trends converge in this project:</p>
<h3 id="the-democratization-of-game-prototyping">The Democratization of Game Prototyping</h3>
<p>A single prompt can now generate a playable 3D FPS with physics, AI, weapons, and audio. This dramatically lowers the barrier to entry for game prototyping. Indie developers and hobbyists can iterate on game concepts in hours rather than weeks. The quality may not match AAA studios, but the speed of iteration is unprecedented.</p>
<h3 id="the-procedural-ceiling">The Procedural Ceiling</h3>
<p>The project honestly documents the limits of procedural generation. AI-generated textures, while impressive, cannot yet match photographed or hand-authored assets. The &ldquo;procedural texture ceiling&rdquo; is a real constraint — and it may be the hardest barrier for AI game generation to overcome. Until AI can generate photorealistic textures that rival captured data, AI-generated games will have a distinct visual signature.</p>
<h3 id="ai-agent-orchestration-matures">AI Agent Orchestration Matures</h3>
<p>The OVERWATCH engine contract and the sequential-vs-parallel findings represent genuine advances in how we think about AI agent coordination. The insight that sequential single-owner passes outperform parallel fan-out is counterintuitive but well-supported by the data. Future AI game development tools will likely adopt similar patterns.</p>
<h3 id="the-honest-benchmark-culture">The Honest Benchmark Culture</h3>
<p>Perhaps the most important contribution of Claude of Duty is its culture of honest self-assessment. The README doesn&rsquo;t claim to have solved AI game generation. It openly scores itself 5.05/10, documents every weakness, and provides reproducible benchmarks. This stands in refreshing contrast to the hype-driven culture that often surrounds AI projects.</p>
<h2 id="where-it-falls-short--the-procedural-ceiling-and-remaining-gaps">Where It Falls Short — The Procedural Ceiling and Remaining Gaps</h2>
<p>For all its technical ambition, Claude of Duty has clear limitations that define the current frontier of AI game generation:</p>
<ol>
<li>
<p><strong>Visual fidelity ceiling</strong> — Procedural textures, while varied (19 surface types), lack the realism of photographed PBR materials. The blocky viewmodel geometry and mannequin-like characters are immediately noticeable to any gamer.</p>
</li>
<li>
<p><strong>Performance constraints</strong> — 28-30 fps at Retina resolution is playable but not competitive. Modern FPS games target 60-144 fps. The browser-based WebGL2 rendering pipeline, while impressive, cannot match native engine performance.</p>
</li>
<li>
<p><strong>No real global illumination</strong> — Lighting relies on shadow mapping and screen-space effects. There is no baked lightmaps, no real-time ray tracing, and no voxel-based GI. This is the single biggest visual gap between Claude of Duty and modern AAA games.</p>
</li>
<li>
<p><strong>Limited gameplay scope</strong> — The project is a technical demo, not a full game. It demonstrates core FPS mechanics but lacks campaign, multiplayer, progression systems, or the content volume of a commercial title.</p>
</li>
<li>
<p><strong>Single map</strong> — The 120x120m market street is the only environment. There is no level editor, no modding support, and no way to extend the world without regenerating from the prompt.</p>
</li>
</ol>
<h2 id="conclusion--a-technical-marvel-that-knows-its-limits">Conclusion — A Technical Marvel That Knows Its Limits</h2>
<p>Claude of Duty is not a Call of Duty killer. It is something more valuable: a honest, reproducible benchmark of what AI-assisted game development can achieve in mid-2026. The project demonstrates that a single well-crafted prompt can orchestrate 55,000 lines of code across 11 subsystems, producing a playable 3D FPS with physics, AI, procedural audio, and dynamic lighting — all in a browser, with zero external assets.</p>
<p>The 5.05/10 score against Call of Duty is not a failure. It is a baseline. Future projects will build on these techniques, and the gap will narrow. The sequential-over-parallel finding, the shader pre-warming optimization, the adversarial critic loop, and the OVERWATCH engine contract are all contributions that will influence how AI game development evolves.</p>
<p>For developers, Claude of Duty is a must-study project. For gamers, it is a glimpse of a future where AI-generated games are indistinguishable from hand-crafted ones. That future is not here yet — but Claude of Duty shows the path.</p>
<h2 id="faq">FAQ</h2>
<h3 id="what-is-claude-of-duty">What is Claude of Duty?</h3>
<p>Claude of Duty is an open-source project that generates a playable first-person shooter game in the browser from a single AI prompt. It uses Three.js r180 and WebGL2 to create approximately 55,000 lines of JavaScript across 11 coordinated subsystems with zero external art assets.</p>
<h3 id="how-does-the-single-prompt-work">How does the single prompt work?</h3>
<p>The prompt instructs AI agents to fan out into specialized sub-agents for each game subsystem, use adversarial critics to score every frame against real Call of Duty, and iterate through a /loop pattern until quality targets are met. It is a structured orchestration prompt, not a simple text description.</p>
<h3 id="how-does-claude-of-duty-compare-to-real-call-of-duty">How does Claude of Duty compare to real Call of Duty?</h3>
<p>In blind A/B testing with 11 adversarial AI critics, every critic in every round picked the real Call of Duty frame. The project scores itself 5.05 out of 10 against Call of Duty, with key weaknesses in character models, procedural textures, global illumination, and frame rate.</p>
<h3 id="what-performance-does-claude-of-duty-achieve">What performance does Claude of Duty achieve?</h3>
<p>After optimization, Claude of Duty runs at 28-30 fps (up from 12-17 fps initially). Boot time is 3.7-4.6 seconds (down from 9-12 seconds). Shader compilation during gameplay was eliminated entirely through pre-warming.</p>
<h3 id="can-i-play-claude-of-duty">Can I play Claude of Duty?</h3>
<p>Yes, the project is open source under the MIT License and available on GitHub at github.com/mshumer/Claude-of-Duty. It runs entirely in the browser — no downloads or installations required.</p>
]]></content:encoded></item></channel></rss>