Skip to content

liraymond04/olc-game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

olc-game-of-life

Implementation John Conway's Game of Life in the olcPixelGameEngine.

olc-pixel-game-engine

Controls

Button Action
Escape Quit
Left click Draw
Right click Erase
Backspace Clear
Enter Simulate start/stop
Space Simulate step
P Play
O Reverse
- Decrease speed
= Increase speed
Left arrow Step back
Right arrow Step forward
Ctrl + Left arrow Jump to front
Ctrl + Right arrow Jump to end

Building

Building is based on Moros1138's pge-template-project CMake files

Arch Linux

Install the required packages with the following command

sudo pacman -Sy base-devel cmake git libpng mesa

Generate project makefiles and build with CMake

# Use the -d flag to build for debugging
./build.sh

You can run the application using the built executable

./build/olc-game-of-life

Windows

Install a C++ compiler like MinGW

Generate project makefiles with CMake

cmake . -G "MinGW Makefiles"

And build the project

mingw32-make

Web build with Emscripten

Web builds use Emscripten, and need the following additional packages:

sudo pacman -S --needed emscripten

Build by passing in a new target flag to the build script

## Optionally pass the -d flag to build for debug
./build.sh -t web

You can run the application by opening a local web server with emrun

emrun build/olc-game-of-life.html

About

Implementation John Conway's Game of Life in the One Lone Coder game engine.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published