Conway's Game of Life - P5.js

Posted: 20 July, 2020

Using P5.js I made this simple example of Conway's Game of Life. Everything about it is pretty simple, and it uses the canvas element to draw out the game over time.

P5.js is a pretty interesting library for creating interactive programs with graphical elements. I have seen it often times used for games, scientific data display, and other graphically intense applications. At first I was going to try and use Vue with P5, but I kept running into issues with Vue re-rendering and undesirable times, so I went with a more vanilla version of using P5 for this.

View the source code on github

The whole thing is about 95 lines of JavaScript total, and I used rollup to bundle the code.

If you are interested in learning to use P5.js you should check out the Coding Train on Youtube. The channel is really interesting, and the host Daniel Shiffman is entertaining and fun to watch.