Download .tap file

This is the end result of the #zx-life and #micro-optimisation series of posts, where I documented the process of building and then gradually improving my first ZX Spectrum “game”: an implementation of Conway’s Game of Life. It was the first thing I wrote for the ZX Spectrum and, although it is still a bit rough around the edges, it marks the start of a hobby that I have really grown to love.

The project started in ZX BASIC as a deliberately simple proof of concept, then went through a long run of refactors and optimisations. The #zx-life posts cover the bigger structural changes: reducing the amount of work done each generation, introducing active-cell tracking, moving from BASIC to C with z88dk, compressing the grid representation, and splitting the code into clearer libraries so the implementation became easier to reason about as well as faster. By the end, the program had also become more colourful and more interesting to watch, using the evolving patterns to display repeating messages.

The #micro-optimisation posts then took that cleaner C version and pushed it further, replacing individual modules with Z80 assembly in a gradual “strangler fig” style rewrite. That series was less about changing the overall design and more about learning what actually pays off on the ZX Spectrum: when the compiler already does something clever, when hand-written assembly can save time or space, and when a high-level algorithmic improvement matters more than dropping to a lower level. The result is the tape file above: the version that grew out of the whole series and the one that really kicked off my interest in writing for the machine.

Talk is cheap, show me the code.

Play it now