Game of Life

cellular automaton
Side project · 2026

Conway's Game of Life, running at up to 60 generations a second on a wrap-around canvas you can paint into and watch evolve.

Game of Life screenshot
Demo · a glider gun spraying across the grid

Conway's Game of Life is four lines of rules that produce endless behavior, and the appeal is almost entirely in watching it move. A lot of versions I tried slowed down past a small grid, or didn't expose the controls that make it worth poking at: pausing mid-pattern, stepping one generation at a time, or dropping in a glider gun to see where it goes.

I wanted one that stayed smooth at a full screen of cells and let me drive it like an instrument. So the simulation runs on a flat typed array with a second buffer it swaps each tick, the canvas redraws every frame, and everything (speed, grid size, patterns, painting) is wired to controls and keyboard shortcuts so you can stay in the loop while it runs.

Under the grid

The rules

B3/S23. A live cell with two or three live neighbours survives; a dead cell with exactly three live neighbours is born; everything else dies or stays dead. That is the entire rule set. Out of it come the Pulsar, a period-3 oscillator of 48 cells; the R-pentomino, five cells that stay chaotic for 1,103 generations before settling; and the Gosper Glider Gun, the first pattern anyone found that grows without bound.

Stack

Vite · React · TypeScript · Tailwind, rendering to a raw Canvas at up to 2× device pixel ratio. The simulation is plain typed-array logic kept out of React's render path, so the component tree only handles controls while the grid steps and draws on its own loop. Static build on GitHub Pages, nothing to install and nothing to sign into.

← all projects