https://github.com/srvariable/gol
The mythical Conway's Game of Life
https://github.com/srvariable/gol
c conways-game-of-life raylib
Last synced: about 1 year ago
JSON representation
The mythical Conway's Game of Life
- Host: GitHub
- URL: https://github.com/srvariable/gol
- Owner: SrVariable
- Created: 2024-05-03T00:36:07.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-08T02:22:16.000Z (almost 2 years ago)
- Last Synced: 2024-06-08T21:14:44.675Z (almost 2 years ago)
- Topics: c, conways-game-of-life, raylib
- Language: C
- Homepage:
- Size: 3.01 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GOL
The mythical Conway's Game of Life made in C using [raylib](https://github.com/raysan5/raylib).
# Preview
[preview.webm](https://github.com/SrVariable/GOL/assets/96599624/5661c44a-a311-429a-9292-a2223cad5a9f)
# Installation
## Debian / Ubuntu
```shell
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-dev
```
## Windows
Follow steps 1, 2, 3: https://github.com/raysan5/raylib/wiki/Working-on-Windows#manual-setup-with-w64devkit
# Controls
|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.
# How to play
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.
# References
- 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
# Contributing
If you find any bug or have any suggestion, please open an issue [here](https://github.com/SrVariable/BFL/issues/new).