Game of Life in 6 hours

Jan. 29, 2026, 8:36 p.m.

One afternoon, I was bored watching YouTube videos about “cellular automata”, a pretty simple concept, and it caught my eye enough that I wanted to give it a shot myself. You can play my version on this very site.

The idea comes from “Conway’s Game of Life”. There’s just something about it that makes you stare as cells of two possible colors come to life and transform following some pretty simple rules:
- Cells with fewer than two neighbors die.
- Cells with two or three neighbors live on.
- Cells with more than three neighbors die.
- Dead cells with exactly three neighbors are resurrected.

Pretty straightforward rules.

Putting my phone aside, I set out to build the game “in an afternoon.” You know, that classic thing you say but never actually do, and it ends up taking 3 or 4 days.

But this time, I actually pulled it off. From the moment I created the project in Godot to the current version, about 5-6 hours passed. The most tedious part, which doesn’t count toward those 6 hours, was wrestling with this website and its Django backend to embed the game in an iframe and make it playable, dealing with CORS, CSP headers, and all that fun stuff.

The hardest part, if you can even call it that, was making a version that’s a bit different from the standard one you see everywhere: implementing “wrap-around” instead of an infinite map. The cells on the edges have to detect the ones on the opposite side, both top-to-bottom and side-to-side. Honestly, though, it’s nothing a cup of coffee, a break to pet Anakin, and two lines of code couldn’t fix:

var nx = (x + i + grid_width) % grid_width
var ny = (y + j + grid_height) % grid_height

The game is so simple that this is probably the most complex part of the code.

And that’s pretty much it. I had a couple of other ideas to implement, like cells having “levels” and becoming fixed, or adding predators that move between cells with their own rules. But within 6 hours (30 minutes of which were spent petting my cat), there wasn’t time for much else, so it’s staying as is.

If you want to play the original, there are a thousand versions online, it’s literally everywhere.