NewsCrawler.org

AI agent builds a tower defense game: zero dependencies, 188 green tests, 21.5 hours

A developer had Huawei Cloud's CodeArts coding agent build Entropy Rangers, a browser tower defense[1] game in TypeScript where every placed firewall rewrites the enemies' pathing in real time; the finished project has zero runtime dependencies, weighs about 29 KB gzipped, and passes 188 tests as a purely static site with no backend, database, or telemetry. All code was generated by the AI while the author set the architecture, acceptance criteria, and balance; development plus tuning took about 21.5 hours against an estimated 10 days of hand-writing, roughly a quarter of the timeline. The simulation runs in fixed 1/60-second steps with an injected random number generator and integer-only resource and damage math, and an ECS[2] split keeps DOM calls out of the simulation layer so it can run headless[3]. Because the simulation is deterministic (the same inputs always give the same result), a full recorded session — the instruction stream plus a seed[4] — serves as a regression test: three standard replays run in CI, and any change that breaks determinism or balance makes them fail. The game is open-sourced on AtomGit under Apache-2.0, where it has one star so far; it has no ads, in-app purchases, or tip income, and the author, who entered the project in a Juejin contest, describes a funnel in which the work builds trust that points toward consulting, contract work, and corporate training.

Read the original juejin.cn

Discussion

One commenter says that combining a fixed simulation step, an instruction stream, and state hashes turns "the game runs" into reproducible evidence, and that using a replay as a regression case catches determinism-breaking changes better than raw test counts. Another suggests posting the article and project links on Juejin's short-post feed (沸点) with the contest hashtag to reach more readers.

Sources

  • CNJuejin ZH

    我让 AI 独立开发了一款游戏:零依赖、188 个测试全绿、工期压到四分之一

    10 likes443 views3 comments2 saves

Published: First seen: Читать по-русски

Open as a page