Game Of Life

2019

This implementation of Conway's Game Of Life, a cellular automaton, was written in C++. It features an unlimited space to observe patterns.

Game Of Life loosely simulates "life" by determining which cells on a grid are born and which cells will die for each generation. Players place down cells for an initial configuration, and observe how it evolves over time.

The standard rules for Game Of Life are that cells are born if there are only 3 active neighbours (as if by reproduction), and cells die if there are less than 2 neighbours (as if by underpopulation) or greater than 3 neighbours (as if by overpopulation). Though the rules are very simple, some very complex and almost organic patterns can be created.

In this implementation, custom rules can be defined as well. In the video below, a variant of the Game Of Life ruleset is used which tends to be more explosive.

This project was a personal experiment and quest for optimization. The goal was to create a proper implemenation of Game Of Life, with an unlimited size grid allowing for monstrously large patterns, running in real-time. This was achieved using chunk-based mapping and multithreading.