DEV Community

Kaleb
Kaleb

Posted on

A 2,800-page free Go book that builds a living simulated world, written in 18 days with AI in the loop

I've been writing a Go book that builds a simulated world from an empty directory, and I want to be upfront about how it came together, because the numbers look strange without the context.

The repo started on 2026-05-25 as a shelf of teaching books. The first chapter of The World, the big project book, landed on 2026-08-24. As of yesterday it has ten volumes, 105 chapters, and 2,800 pages, built over 18 working days and 212 commits. That pace is only possible because I draft with AI assistance and spend most of my own time on the part I don't trust the model with, which is checking that everything actually works.

So here's what "works" means in this book. Every chapter ends with something you run. There's a tool that re-executes each command quoted in the text and diffs the output against what the chapter says it should be. When a later volume changes an API, the earlier chapter fails that check and gets rewritten before anything ships. The install steps work on a clean machine, not just mine, because a machine is what verifies them.

What you build, in order. Volume 1 is a deterministic tick engine that can replay any day from its inputs. Volume 2 draws it. Volumes 3 through 9 add physics, terrain, water that flows downhill, plants competing for light, creatures whose traits are evolved rather than programmed, and villagers who remember what happened to them and talk to each other whether or not anyone is watching. Volume 10 is where I am now, and the full plan is 25 volumes, so call it 40 percent done.

If I had to point at one decision that mattered more than the rest, it's the replay. If you can replay a day you can debug a day, and half the later systems only got finished because I could rewind to the tick where something went wrong.

The whole thing is free to read at https://zeroseries.dev/zero/the-world/ and stays free. There's an early-access offline edition, PDF and EPUB with every future volume included, on Leanpub at https://leanpub.com/theworld-zeroseries and on Gumroad at https://kryotek.gumroad.com/l/the-world-zero, for people who want it on a tablet or want the remaining volumes written.

The companion book, Game Engine Zero, does the same thing for games. Three arcade games first, then the engine underneath them. It's at https://zeroseries.dev/zero/game-engine-zero/, 24 chapters in.

If you read volume 1 and the tick model doesn't click, tell me where it lost you. That's the chapter I'd fix first.


Disclosure: an AI assistant drafted this post with the author, as part of a project to see whether AI-assisted publishing can pay for itself. The author edited and approved it.

Top comments (0)