I implemented Conway's Game of Life and Brain`s Brain using Raylib.
- Raylib: A C library for simple 2D game development.
- Conway's Game of Life implementation
- Brian's Brain implementation
- Camera controls (pan and zoom)
- Grid randomization and clearing
- Ability to switch between rule sets
-
Clone the repository:
git clone https://github.com/SamarthPyati/Cellular_Automata_In_Raylib.git cd Cellular_Automata_In_RayLib
-
Install Raylib: Follow the installation instructions on the Raylib website.
-
Compile the Code:
- You can compile the project using a C compiler. If you're using GCC on Windows, use the following command:
gcc -o cellular_automata gol.c -lraylib -lgdi32 -lopengl32 -lm
- On linux / mac operating systems:
gcc $(pkg-config --libs --cflags raylib) -lm -o cellular_automata gol.c
-
Run the Program:
- Build the program.
- Execute the compiled binary:
./cellular_automata
-
Controls:
Key Combination Action Arrow Keys Move the camera Mouse Wheel Zoom in and out Left Mouse Button Toggle cells SPACE Pause/Unpause the simulation R Randomize the grid C Clear the grid Z Reset camera position and rotation Left Shift + Z Reset camera position, rotation, and zoom B Switch the Rules Esc Quit the program
- Save Game state in files
- Colorful gradients to hallucinate
- More user friendly UI
This project is licensed under the MIT License. See the LICENSE file for details.