No .gltf, .png, .wav or .hdr anywhere. Textures are rendered on the GPU into render targets at boot, meshes are built from BufferGeometry, and audio is synthesised with the Web Audio API. The entire game is readable and diffable as source.
Deterministic by construction
All randomness flows through a single seeded generator. Math.random() is banned. The same seed produces the same world, which is what makes the automated capture and regression tooling possible.
Systems, not singletons
Everything in the frame loop implements a System interface and talks over an event bus. FX, audio and HUD are pure listeners — no gameplay system knows they exist.
Contracts you can execute
The netcode and session layers are specified in prose and verified by headless harnesses. `node tools/net-protocol.mjs` asserts 100 properties of the wire format and prints real bandwidth numbers.
A browser FPS built in Three.js and TypeScript, with Rapier for physics. Roughly 148k lines across sixteen subsystems: rendering, materials, world generation, weapons, characters, animation, AI, audio, FX, UI, physics, networking and the session/meta layer.
The organising constraint is that nothing is loaded from disk. A wall's albedo, roughness and normal maps are rendered procedurally on the GPU during boot. A rifle is BufferGeometry assembled from parts in code. A gunshot is synthesised. This makes the project unusually reviewable — every visual result traces back to source you can read, rather than to a binary someone exported from Blender years ago.
To develop taste. Real-time 3D is a discipline you cannot learn by reading about it — you have to look at a scene, decide it is wrong, and work out why. The visual bar is the written residue of exactly that: every entry started as "this looks fake" and had to be sharpened into something specific enough to act on. Building a full FPS forces that judgement across lighting, materials, composition, scale and movement feel all at once.
As a stepping stone to digital twins. Games and digital twins are the same technical problem at different tolerances: procedural geometry, physically based materials, real-time lighting, physics, spatial reasoning, netcode for shared state, and a frame budget you have to respect. A game is the version where being wrong is free and "does this feel right" is a valid acceptance test. The skills transfer; the stakes do not.
The economics are the enabling condition. A codebase this size used to be a multi-year team effort, so only people intending to sell a game could justify one. That cost has fallen far enough that a 148k-line engine is now a reasonable way to learn something — cheap enough to treat as an experiment, and cheap enough to discard and redo.
This repository was produced by Claude Code from a single prompt, fanning out parallel subagents per subsystem with adversarial critics scoring the output against shipped AAA titles. The visual bar is the rubric those critics used, and it is worth reading on its own — it is a concrete list of the specific tells that make real-time WebGL look like a hobby project.
That origin is the reason for some of the conventions here. The documents under this site are written as contracts: they describe what a subsystem guarantees so that independent authors can build against it without coordinating. They are the source of truth, and the code follows them.
git clone https://github.com/kvnloo/cod.gitcd codnpm installnpm run dev
Then open the printed URL. Requires Node 20+ and a browser with WebGL2.
Honest status
This is an experiment, not a shipped game. Expect rough edges, unfinished subsystems and places where the code and these contracts have drifted apart — NETCODE documents its own known divergences rather than hiding them. Bug reports and PRs are welcome.