https://github.com/pacatro/raylife
A simple implementation of the Conway's Game of Life using raylib.
https://github.com/pacatro/raylife
c docker game-development gameoflife raylib
Last synced: 12 days ago
JSON representation
A simple implementation of the Conway's Game of Life using raylib.
- Host: GitHub
- URL: https://github.com/pacatro/raylife
- Owner: Pacatro
- License: mit
- Created: 2024-12-11T22:34:29.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-12T17:13:15.000Z (8 months ago)
- Last Synced: 2025-07-08T17:49:04.240Z (4 months ago)
- Topics: c, docker, game-development, gameoflife, raylib
- Language: C
- Homepage:
- Size: 5.67 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RayLife
A simple implementation of the [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) using [raylib](https://www.raylib.com/).
## ๐ฎ 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](https://www.raylib.com/) installed.
1. Clone the repository
```bash
git clone https://github.com/Pacatro/raylife.git
cd raylife/
```2. Run `make`
```bash
make
```3. Run `./raylife`
```bash
./raylife # default: 500
```## ๐ณ Docker
You can use the [Dockerfile](./Dockerfile) to build a Docker image with the project.
1. Build the image
```bash
docker buildx build --tag raylife .
```2. Run the image
```bash
xhost +local:docker
docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix raylife
```## ๐ฅ Example
Hereโs a preview of the game:

## ๐ License
[MIT](https://opensource.org/license/mit/) - Created by [**Paco Algar**](https://github.com/Pacatro).