Skip to content

Parzival-3141/Ziggys-Game-of-Life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ziggy's Game of Life

Conway's Game of Life in Zig.

game-of-life-demo.webm

Made in a couple pairing sessions at Recurse Center.

Building

Supports Windows and MacOS. If using MacOS, make sure SDL2 is installed in your /Library/Frameworks path.

zig build
zig-out/bin/zgol.exe <args>
# Alternatively you can just use the run step
zig build run -- <args>

Examples

Try loading an example with

zgol -load=examples/<filename>

Because the grid is represented as a binary array, you can load any arbitrary data! Try loading the executable with

zgol -load=zgol.exe

Usage

Use -help to see CLI commands.

Input Action
Left Click Fill Cell
Right Click Erase Cell
Space Toggle Simulation
+ Increase Update Speed
- Decrease Update Speed
R Reload file (if any)
S Save file

Saving will always create a new file in <exe-directory>/saves, named by the current timestamp. Reloading will attempt to load the latest save or the inital -load file.

Built with

About

Game of Life and (Not Quite) Pixel Art Editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages