The mythical Conway's Game of Life made in C using raylib.
preview.webm
sudo apt update && sudo apt install build-essential git \
libasound2-dev libx11-dev libxrandr-dev libxi-dev \
libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev \
libxinerama-dev libwayland-dev libxkbcommon-devFollow steps 1, 2, 3: https://github.com/raysan5/raylib/wiki/Working-on-Windows#manual-setup-with-w64devkit
| Key | Description |
|---|---|
| B | Blinker |
| G | Glider / Gospel Gun Glider |
| Left Click | Put cell |
| Right Click | Remove cell |
| . | Increase speed |
| , | Decrease speed |
| Space | Pause / Play game |
| R | Restart board |
Note
If you press Shift when using a key to select a pattern, it will switch reversed.
Execute make run and it will start the game. Left click to put an alive cell or right click to put a dead cell.
To put a pattern, hold its respective key and left click. For example G Left Click will place
a Glider in the selected zone.
- Game of Life: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
- Patterns: https://www.researchgate.net/figure/Selected-morphologies-in-the-Game-of-Life-Their-identification-in-the-environment_fig5_318515088
- Gospel Gun Glider: https://conwaylife.com/patterns/gosperglidergun.cells
- Raylib: https://github.com/raysan5/raylib/blob/master/src/raylib.h
If you find any bug or have any suggestion, please open an issue here.