Skip to content

SamarthPyati/Cellular_Automata_In_Raylib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cellular Automata in Raylib (C)

I implemented Conway's Game of Life and Brain`s Brain using Raylib.

Requirements

  • Raylib: A C library for simple 2D game development.

Feature

  • 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

Installation

  1. Clone the repository:

    git clone https://github.com/SamarthPyati/Cellular_Automata_In_Raylib.git
    cd Cellular_Automata_In_RayLib
  2. Install Raylib: Follow the installation instructions on the Raylib website.

  3. 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 

Usage

  1. Run the Program:

    • Build the program.
    • Execute the compiled binary:
      ./cellular_automata
  2. 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

Upcoming Features

  • Save Game state in files
  • Colorful gradients to hallucinate
  • More user friendly UI

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages