finds.dev← search

// the find

unclebob/spacewar

★ 676 · Clojure · updated May 2026

Space War starting in Episode 55 of cleancoders.com

A Star Trek-themed space strategy game written in ClojureScript by Uncle Bob (Robert C. Martin), built as a companion to his Clean Coders screencast series. It's a full-featured browser game with resource management, tactical combat, and a galaxy-spanning campaign. If you're interested in seeing what idiomatic functional game logic looks like in Clojure, this is a concrete example.

The game logic is structured as pure functions operating on immutable state, which is exactly what you'd expect given the author — the separation between `game_logic/` and `ui/` is clean and the spec coverage across all game systems (klingons, shots, bases, clouds, romulans) is genuine. The `.cljc` extension throughout means the same code compiles to both Clojure and ClojureScript, which is a real architectural commitment, not an afterthought. The game itself has surprising depth — resource economics, line-of-supply logistics, damage degradation, enemy AI behavioral states — more design than you'd expect from a screencast demo. Deps.edn with `:cljs` and `:cljs-prod` aliases keeps the build story minimal and reproducible.

This is a teaching artifact, not a maintained open-source project — the README points to cleancoder.com and there's no contribution guide, issue tracker engagement, or roadmap. The UI layer is all custom widgets in ClojureScript with no component library, meaning the rendering code is tightly coupled to Quil/canvas conventions that aren't documented anywhere in the repo. Save state is a flat file (`spacewar.world`) with no versioning, so any schema change in game logic silently breaks existing saves. There's also no CI configuration, so the spec suite only runs if you know to run it manually.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →