zsmb's prog site

Game of Life



This classic probably doesn't need much of an introduction, it's a simple take on Conway's Game of Life. Written in C++, using SDL2 (and SDL2_gfx) for the graphics.


I don't think that explaining the concept of Conway's Game of Life would make much sense here, so if you haven't come across it yet, here's the  Wikipedia article. As for the project itself, it was written in one sitting, but it turned out to be a decent looking object-oriented piece (as far as I'm concerned). It's also probably the first thing I've written that's using SDL2, other than the very basic test program that I've used to see if my installation of it is functional.


  • Left click: create a cell
  • Right click: delete a cell
  • Backspace: delete all cells
  • Space: pause
  • Escape: quit


Downloading the zip file that contains the executable results in a warning (at least in Chrome) as a security measure, but you can choose to "Keep" it.

Name Description Size Date
gol.cpp Source code 2.68 KB 2015.04.13.
gol.zip Windows executable with dll's 812 KB 2015.04.13.
gol.tar.gz Linux project with Makefile and SDL_gfx 36 KB 2015.06.29.



Fixed screen not redrawing when using backspace while paused


Added an easily compilable Linux version (You do need to have SDL2 installed)