All examples · Experiments

Game of Life

What this example shows

Drag the mouse to draw living cells, space pauses and R scatters a new colony. The recently dead leave a fading glow.

Every cell is a pixel, and every generation happens on the graphics card. A picture cannot be drawn from itself, so there are two createSpriteTextures taking turns: one is drawn from the other through a material with the rules, and the other copies it back.

The CPU never touches a cell.

Starting