JavaScript Haxe HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
bin
embed
js
lib
screenshots
shaders
util
webgl
.gitattributes
.gitignore
.gitmodules
.travis.yml
CodeCompletion.hx
GameOfLife.hx
GameOfLife.hxml
GameOfLife.hxproj
LICENSE
Main.hx
PatternFileReaderMacro.hx
PatternLoader.hx
README.md
debug.hxml
release.hxml

README.md

Project logo

Build Status

Interactive implementation of Conway's Game of Life written with Haxe and WebGL. Run it in your browser.

Features

  • Add thousands of Game of Life patterns to the simulation with one click.
  • Speed up, slow down, step, pause and clear the simulation.
  • Easily preview and select your preferred patterns.

Usage

Run the demo, select a pattern via the dropdown or clicking in the preview area, and click or tap to add it to the simulation. Here it is in action:

Screenshot

Screenshot

How It Works

The Game of Life is a cellular automaton invented by John Conway in 1970. It is a simulation that takes place on a two-dimensional orthogonal grid of square cells, each of which can either be dead or alive.

Each time the simulation is updated, every cell in the grid interacts with its eight neighboring cells in accordance with these four rules:

  • Any live cell with fewer than two living neighbours dies (isolation).
  • Any cell with two or three living neighbours survives this time (survival).
  • Any cell with more than three living neighbours dies (overpopulation).
  • Any dead cell with three living neighbours comes to life (reproduction).

Conway designed these rules to produce interesting results - even self replicating patterns can be produced. Read more here.

Notes

  • The patterns are from the LifeWiki collection. Credit for these goes to the original creators.
  • This project was inspired by Golly, a cross-platform cellular automaton simulator.
  • If you have any questions or suggestions then get in touch or open an issue.

License

  • The Haxe and webpage code here, but not the pattern files, are licensed under the GPL.
  • The noUiSlider settings sliders are WTFPL.
  • The three.js library is MIT.