Daniel Litvak

Engineer & Developer

/ Back to portfoliop5.jsCellular automataInteractive grid

Conway's Game of Life

A faithful port of my legacy Game of Life demo: a 40x40 toroidal grid you can edit cell-by-cell, pause, and accelerate or slow down on the fly. Toggle the statistics overlay to watch live population trends as patterns collide and settle.

Description

  • Runs Conway's classic rules on a 40x40 wrapping grid so gliders loop endlessly across edges.
  • Statistics mode (key S) tracks population history with a filled graph, matching the original portfolio build.
  • Mouse interactions mirror the legacy version: click or drag to flip cells without breaking the loop.

Controls

Click add/remove a cell. Drag to paint.

Space pause/resume the automaton.

R randomizes the grid.

S toggles the population statistics overlay.

Scroll adjusts the step speed (lower values run faster, higher values slow down).