Unity 4: Game Of Life in 3D

David Joiner, Kean University

Conway’s Game of Life is a classic problem for computer science students, and provides an early example of cellular automata as well as an opportunity to practice nested loops and multi-dimensional arrays.

It’s well studied in 2D, with many great models and lessons available online. See for example: http://www.shodor.org/interactivate/activities/Life and http://www.shodor.org/petascale/materials/UPModules/GameOfLife. In the game of life, the world is modeled as a rectangular grid, where every cell is either occupied or vacant (on or off), and the occupation state of the cell in the next turn depends on whether nearby cells are currently occupied according to a set of rules.

It makes for great visuals in 2D that can be exciting to have students study, either with working models or with practicing creating their own.

Unity makes for a great environment to study this classic model in 3D.

This post (https://joinerda.github.io/Game-Of-Life-3D) will walk through creating a Unity 3D model of the Game of Life in 3D. Cells will be visualized as on (visible) or off (not visible), with color and transparency used to indicate the stability of each cell.

It will also allow for some practice working with primitive materials and transparency in Unity scenes.

Unity 3 | Unity 5

Leave a Reply