Skip to content

C++ adaptation of the famous Game of Life by mathematician John Conway, using OpenGL for graphics.

Notifications You must be signed in to change notification settings

viljami-j/ConGOL

Repository files navigation

Conway's Game of Life

Overview

C++20 adaptation of the famous Conway's Game of Life, using OpenGL for graphics.


A looping pattern that emerged in simulation as per the rules below.

congol

Rules

  1. Any live cell with fewer than two live neighbours dies, as if by underpopulation.
  2. Any live cell with two or three live neighbours lives on to the next generation.
  3. Any live cell with more than three live neighbours dies, as if by overpopulation.
  4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

Find more information about the game here.

Controls

  • LMB : Draw cells
  • RMB : Erase cells
  • Space : Start/stop simulation
  • Shift+T+MousewheelUp : Evolve
  • Shift+T+MousewheelDown : De-evolve
  • F : Show FPS in window frame

Known issues

  • Crash if evolution extends outside the top or bottom of window (overlap handling is unimplemented in 0.9)
  • Resizing window breaks the graphics.

Credits

Graphics library for utilizing OpenGL: @reinterpret-pointer-cast