Conway's Game of Life written in C and compiled to WebAssembly
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
web
.gitignore
README.md

README.md

The Game of Life

Yet another implementation of Conway's Game of Life. This time in C with SDL2.

Compilation to WebAssembly and asm.js via emscripten is also supported.

Play on micromind.me/golife.

# install SDL2 first (eg. brew install sdl2)
cc -O3 -lsdl2 -I/usr/local/Cellar/sdl2/2.0.8/include/SDL2/ src/*.c -o life
# ./life

# install emsdk first (see emsdk project)
emcc -O3 -s WASM=1 -s USE_SDL=2 -I/usr/local/Cellar/sdl2/2.0.8/include/SDL2/ src/*.c -o web/life.wasm -o web/life.js
# cd web; python ./server.py and open browser on http://localhost:8000/index.html