







5 days of progress making a tower defense game with Codex
So a few weeks ago I went looking for an old iPhone game I played ten-ish seventeen years ago (!) called GeoDefense Swarm. It's been off the App Store for at least 10 years...so I decided to make a spiritual successor to it.
I'm a software dev with ~10 years of experience but, critically, not a frontend dev at all nor have I ever touched game development, so I did spend a few days researching game design patterns and frameworks and engines and whatnot. In the end I decided to go with just a webapp made in Typescript, rendered on HTML canvas & using the PixiJs library for graphics.
Project was created off of my Codex template which initializes new projects with an AGENTS.md + 6 other documents similar to AGENTS.md but with their own scope:
PLANS.mdensures larger changes are driven by self-contained execution plans (this is adapted from OpenAI's article on exec plans)PRODUCT.mdkeeps the current product truth explicit, especially for small and medium user-visible changes that may not get their own ExecPlan.ROADMAP.mdkeeps intended future direction explicit so contributors can distinguish current behavior from planned behavior.CODESTYLE.mdkeeps source conventions, commenting standards, and code-file size expectations explicit.DESIGN.mdcaptures stable product and interface language.ARCHITECTURE.mdcaptures stable system boundaries and invariants.
To iterate on the game / add features / fix stuff I just create issues on GitHub that are fairly descriptive, and then tell codex-cli to look up the issue and implement/fix it. For non-trivial stuff Codex will then create a plan by asking me questions about what direction I want to go in, etc, which builds up a fairly comprehensive spec for the feature which is store in an Exec Plan as referenced above. Then it builds the thing! Most features take around 30 minutes to an hour to complete.
One big struggle I had was making the frontend look decent - initially Codex would make *terrible* looking UIs and overlapping elements and whatnot. I added two skills to fix this: one that takes screenshots of the app using agent-browser (a headless chrome instance) and inspects them with GPT-Image-2 for issues, and another that uses Google Stitch for mockups of UI elements and screens/menus. UI is still the weakest part of Codex but with these two additions you can do a lot!
Note that I'm on the $100/month Codex plan and have about 50% of my weekly limit remaining from the past few days of usage, so this definitely isn't feasible on the $20/month plan.
Some stats:
- 35 PRs merged (which I manually review every time!)
- 109 commits pushed
- 12,000 lines of Typescript + 8,000 lines of HTML/CSS