Cellular automata toys in LÖVE2D
 
 
Go to file
mat ess 212948b1c4 Add build instructions and make lurker optional 2022-09-12 21:37:48 -04:00
ants Add build instructions and make lurker optional 2022-09-12 21:37:48 -04:00
life Add build instructions and make lurker optional 2022-09-12 21:37:48 -04:00
nix working ants!! 2022-09-11 00:23:52 -04:00
.envrc Initial commit 2022-09-09 15:44:37 -04:00
.gitignore working ants!! 2022-09-11 00:23:52 -04:00
README.md Add build instructions and make lurker optional 2022-09-12 21:37:48 -04:00
colorbrewer.lua Add life 2022-09-11 22:19:31 -04:00
flake.lock Initial commit 2022-09-09 15:44:37 -04:00
flake.nix Spawn ants with mouse, FPS counter 2022-09-11 12:08:09 -04:00
util.lua Add life 2022-09-11 22:19:31 -04:00

README.md

cellular automata toys in löve2d

toys

ants

langton's ant, heavily inspired by Andrew Healey's blog post and code.

supports multiple colors by passing a custom set of rules, see wikipedia.

click on the screen to spawn new ants.

life

conway's game of life. supports other life-like cellular automata rules, see wikipedia

left click or click and drag to flip cells on, and right click to spawn a glider.

colorbrewer

this repo includes a lua interface to the lovely and accessible ColorBrewer2 colorschemes based on the research of Dr. Cynthia Brewer, based on the original ColorBrewer code and the implementation in Chroma.js.

running the toys

if you have löve installed on your system, you can just run the toys by name:

love ants
# run with a cool square pattern
love ants LRRRRRLLR
# other options
love ants <rule> <grid-unit-width-px> <simulation-steps-per-frame> 

love life
# run with HighLife rules
love life B36/S23
# other options
love life <rule> <grid-unit-width-px> <simulation-steps-per-frame>

if you have nix, you can use the provided flake.nix to get a working environment for running the games, as well as support for hot reloading if you want to hack on them.

nix develop
love ...