
Conway’s Game of Life is a “zero-player game”. A grid of cells evolves on its own, by three rules:
- A live cell with fewer than two live neighbours dies.
- A live cell with more than three live neighbours dies.
- A dead cell with exactly three live neighbours comes to life.
I wrote this version in Object Pascal with the Delphi VCL, as one of my first projects after joining a company that works mostly in Delphi. Writing something small but complete was the quickest way to learn the language properly.
Complexity from simple rules
My board wraps at the edges, so it has no walls and patterns can run forever. The glider walks diagonally across the board indefinitely:
The Gosper glider gun, shown at the top of this page, produces an endless stream of gliders. And the “exploder” starts as a plain line of cells, blooms into an intricate pattern, and always dies out after its 49th generation:
How it is built
- Rendering by hand. No game engine: each generation is drawn cell by cell onto a Windows forms canvas, with care taken over memory in the drawing code so long runs don’t leak.
- Deterministic. The same starting board always evolves the same way, exactly to Conway’s rules.
- Save and load. Patterns and board settings can be exported and imported, so they are easy to share.
- Old Windows too. It compiles with Delphi 7 onwards, so it runs on versions of Windows as old as XP.
Ready-built Windows executables are on the GitHub releases page.