Skip to content

A simple implementation of the Conway's Game of Life using raylib.

License

Notifications You must be signed in to change notification settings

Pacatro/raylife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayLife

A simple implementation of the Conway's Game of Life using raylib.

🎮 Controls

  • 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

🖥️ Build locally

You must have raylib installed.

  1. Clone the repository

    git clone https://github.com/Pacatro/raylife.git
    cd raylife/
  2. Run make

    make
  3. Run ./raylife

    ./raylife <generations> # default: 500

🐳 Docker

You can use the Dockerfile to build a Docker image with the project.

  1. Build the image

    docker buildx build --tag raylife .
  2. Run the image

    xhost +local:docker
    docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix raylife

🎥 Example

Here’s a preview of the game:

RayLife GIF

🔑 License

MIT - Created by Paco Algar.

About

A simple implementation of the Conway's Game of Life using raylib.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published