Knight Slaying Dust Bunnies: A Browser Platformer Built in One Evening — Entirely Inside OpenAI Codex
A vertical-slice 2D action platformer where every artifact — code, sprite art, sound effects, level grids — was authored through a single agentic build session. No frameworks, no build step, no human-drawn pixels.
Pushing Agentic Dev to Its Logical Conclusion
Most "AI-built" projects keep the agent in a narrow lane — it writes the JavaScript, while a human still does the design work, draws the assets, picks the colors, and stitches the runtime together. We wanted to see what happens when you remove every one of those side-tracks.
Not just code — the sprites, the SFX, the level grids. Every artifact lived inside the agent loop.
The brief was simple: in a single evening, ship a complete vertical slice of a 2D action platformer to a public URL. Not a tech demo, not a screenshot reel — a playable game, running on both phones and desktops. The catch was that every artifact had to be produced inside the OpenAI Codex session. Code and architecture decisions, yes; but also the knight's idle animation, the dust-bunny sprite, the boss dragon, the menu music, the level layouts. If it couldn't be coaxed out of a prompt, it didn't ship.
A platformer was the deliberately uncomfortable choice. It is the genre that forces breadth — physics, enemy AI, art, audio, input handling, persistence, mobile support — and there is no single piece you can phone in. If the agent loop could carry an action platformer end-to-end, it could carry most things.
One Evening. One Browser. Zero Bundlers.
Zero-Dependency Vanilla Stack
HTML5 Canvas 2D, native ES modules, the Web Audio API, and browser storage — that is the entire runtime. No bundler, no transpiler, no package manager, no framework runtime. Fewer moving parts to maintain, fewer dependencies to keep up to date, and a small enough surface that a single agent session can hold the whole thing in mind at once.
Codex-Generated Sprite Pipeline
Every sprite, background, tile, and pickup was produced inside Codex. A load-time preprocessing pass cleans the agent's rough edges — off-color sprite backgrounds become proper transparency before the first frame is drawn — so generated art composites cleanly over the level without per-asset hand cleanup.
Three-Layer Composition Root
Pure-data values, stateful gameplay actors, and systems are kept on three separate layers, composed by a single orchestrator. Actors request effects through an injected interface rather than reaching into the orchestrator — a pattern that keeps every agent edit local, scoped, and reviewable.
Prompt → Codex → Game-Ready
What Shipped
A playable browser game running at knightgame.solafide.ca — all of it produced in one Codex session.
1 Evening
End-to-End Build
From empty repository to playable, deployed game — code, art, audio, levels, mobile controls. One sitting.
~3,500
Lines of Vanilla JS
Three conceptual layers — data, gameplay actors, systems — under a single orchestrator. Every line authored in the agent loop.
0
npm Dependencies
No bundler, no framework runtime, no lockfile drift. The browser's native module loader is the only runtime.
4
Input Modalities
Keyboard, mouse, gamepad, and touch — unified behind a single action API, with stuck-button calibration on connect.
4
Enemy Variants
Basic patrollers, pouncers, heavies, and a projectile-firing dust dragon boss — all sharing one configurable archetype, with stats kept as plain data.
1280×720
Native Canvas Resolution
Letterboxed by CSS instead of re-rendered, so gameplay parity between desktop and mobile is total.
Built With
Curious what an evening of agentic dev can ship?
Whether you're evaluating Codex as a build pipeline or want to see how far the platform stretches on a real product, we'd be glad to walk through the architecture in detail.