A simple implementation of the Conway's Game of Life using raylib.
- Mouse wheel: zoom in/out
- Space Key: toggle between play and draw modes (If the number of generations exceeds the maximum, step to the next generation)
- Left mouse button: toggle cell
- Right mouse button: move camera
- Up Arrow: Increase generation interval
- Down Arrow: Decrease generation interval
- R Key: reset all
You must have raylib installed.
-
Clone the repository
git clone https://github.com/Pacatro/raylife.git cd raylife/
-
Run
make
make
-
Run
./raylife
./raylife <generations> # default: 500
You can use the Dockerfile to build a Docker image with the project.
-
Build the image
docker buildx build --tag raylife .
-
Run the image
xhost +local:docker docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix raylife
Here’s a preview of the game:
MIT - Created by Paco Algar.