GameOfLifeCpp is a C++20 implementation of Conway's Game of Life with SDL2 visualization.
The simulation logic is separated from the application and rendering code. The grid is stored as a contiguous one-dimensional array and can be edited interactively while the simulation is paused.
Runtime parameters such as window size, cell size and update interval can be changed from the command line. A benchmark mode runs the simulation without initializing SDL and measures a single update.
SDL2 must be available to CMake. The project downloads cxxopts automatically.
cmake -S . -B build
cmake --build build --config ReleaseGameOfLife --width 800 --height 600 --cell 10 --speed 100
Press Space to pause or resume, Esc to exit, and click cells while paused to change their state.
Benchmark example:
GameOfLife --width 1920 --height 1080 --cell 1 --benchmark --benchmark-mode=random