Skip to content

Interactive Game of Life Implementation in C using Raylib.

License

Notifications You must be signed in to change notification settings

FilippoPaganelli/c-gol-raylib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interactive Game of Life Implementation in C using Raylib.

This is an implementation of Conway's Game of Life written in C, using Raylib for the graphics. The canvas is initialised with a simple Glider, or with a saved state from the file argument.

TODO:

  • Load state from file
  • Save state to file
  • Show events notification (e.g. on file save or error)
  • Add key command to randomly generate a state
  • Allow mouse dragging in DRAW mode (?)

Compile and Run:

make
./gol ["state.gol"]

Before compiling, install Raylib.

Controls:

  • (d): enter DRAW mode and use mouse to spawn/kill cells on the canvas
  • (SPACE): save current state in a checkpoint and PLAY/PAUSE the simulation
  • (w): REWIND to the state saved in the checkpoint
  • (r): RESET to an empty canvas
  • (R): populate the canvas with a random state
  • (S): SAVE the current state to a file (state.gol) to load it in a future session

Video demo:

gol-raylib-notif.mp4

About

Interactive Game of Life Implementation in C using Raylib.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published