Games

Two small toys that run right here in the page. There's nothing to install and no account needed. Click one and play.

Life

Conway's Game of Life is a grid of cells, each alive or dead, following two rules:

  • a live cell with two or three live neighbours survives;
  • a dead cell with exactly three live neighbours comes alive.

Every other cell dies or stays dead. That's the whole game, yet it produces gliders, oscillators, guns that fire spaceships forever, and even working computers.

${games.life()}

note Things to try

  • Pick Glider gun as the brush, click once on an empty board, and watch it fire gliders.
  • Stamp an R-pentomino or Acorn: five or seven cells that stay chaotic for over a thousand generations.
  • Switch the Rule. HighLife has a pattern that copies itself; Day & Night treats live and dead cells the same way, so it looks the same with the colours flipped.

Colour shows age: bright cells were just born, deeper colours have been alive a long time. The faint marks are where cells recently died. The board wraps around at the edges.

Purrvim

Schro the cat runs a tiny vim school. Seventeen short levels take you from hjkl to text objects, . repeat, :%s and, finally, getting out of vim. Each level has a par: finish in that many keystrokes or fewer for three stars.

${games.purrvim()}

LevelsWhat you learn
1–2Moving with h j k l, and counts like 6j
3–4Words (w b e) and line edges (0 ^ $)
5Big jumps: gg, G, 12G, :12, plus :set rnu
6–8Precise jumps: f t ; ,, search with / n *, and %
9–11Editing: x dw dd, Insert mode, and changing text with c
12–13. repeat, u undo, Ctrl-r redo, registers and p
14–16Visual mode, :%s/old/new/g, and text objects like di( ci"
17:wq and ZZ

Purrvim needs a keyboard. Your progress is kept in this browser only.

How this is built

Both games are SilverBullet sandboxed widgets: a little HTML and JavaScript that runs in its own frame inside the page, so it can't touch the rest of the site. Each lives on its own library page as a Space Lua function, and this page calls them with games.life() and games.purrvim():