This is a Conway's Game of Life implementation using Raylib. The Game of Life is a famous cellular automaton created by John Conway, where cells evolve based on simple rules.
- Pause and resume simulation
- Randomize initial state
- Manual cell activation/deactivation
- Adjustable simulation speed
- Simple and efficient rendering using Raylib
The Game of Life is a zero-player game where the evolution of a grid of cells follows simple rules. Each cell can be alive or dead, and its state in the next generation is determined by its neighbors.
- Underpopulation: A live cell with fewer than 2 live neighbors dies.
- Survival: A live cell with 2 or 3 live neighbors stays alive.
- Overpopulation: A live cell with more than 3 live neighbors dies.
- Reproduction: A dead cell with exactly 3 live neighbors becomes alive.
- The game runs on a grid (finite or infinite).
- Each step generates a new state based on the above rules.
- The process continues indefinitely or until a stable pattern is reached.
- Still Life: Patterns that don’t change (e.g., Block, Beehive).
- Oscillators: Patterns that cycle through states (e.g., Blinker, Toad).
- Spaceships: Patterns that move across the grid (e.g., Glider, Lightweight Spaceship).
- Raylib (latest version recommended)
- C/C++ Compiler (GCC, Clang, MinGW, etc.)
- Make (to use the Makefile)
- Clone the repository:
git clone https://github.com/C-JeanDev/Game-Of-Life.git
- Makefile:
make clean && make && ./game.out
- SPACE → Pause/Resume simulation
- C → Clear grid
- R -> Randomize Grid
- Left Click → Toggle individual cell state
- Up/Down Arrows → Increase/Decrease simulation speed
- ESC → Exit the game
This project is licensed under the MIT License.