Want some programming help? [close]


John Conway's Game of Life implemented in Ruby with Gosu. The Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970. Read more on Wikipedia.


Installing and Running

It can be installed as a Ruby Gem and run with the following commands.

gem install nanolife

Alternatively, you can get the source and build the gem yourself.

git clone https://github.com/DevDungeon/NanoLife
cd NanoLife
gem build nanolife.gemspec
gem install nanolife-1.0.0.gem


  • s - Start and stop (pause) the game
  • c - Clear the grid
  • r - Randomize the grid
  • Left Click - Invert the state of the cell clicked
  • q/Esc - Quit


Gosu gem dependency will require native build tools. In Windows that means having the Ruby DevKit which can be downloaded from RubyInstaller.org and in Debian Linux installing build-essential, libsdl2-dev, libsdl-ttf-dev, libopenal-dev, libpango1.0-dev, libsndfile-dev, and ruby-dev packages.

# In Debian based Linux
sudo apt-get install build-essential libsdl2-dev \
libsdl2-ttf-dev libopenal-dev libpango1.0-dev \
libsndfile-dev ruby-dev

On Mac, install SDL2 with Brew before installing the gem.

brew install sdl2

Source Code

Ruby Gem