Hexagonal grid-based game of life variant with cells of granular values.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.textile
constants.js
controller.js
controller_test.js
driver.js
game.html
grid.js
grid_test.js
jquery-1.9.0.min.js
presenter.js

README.textile

Hexagonal Population Game of Life

© 2013 Sam Pottinger
Released under the GNU GPL v3 license.
Done for CU Boulder CSCI 4900 – Independent Study (Software Engineering, Emergence, and Complex Adaptive Sys.)
Produced under the guidance of Professor Ken Anderson

Motivation

While typically Conway’s Game of Life focuses on a square-based “game board”
environment, This project explores how the classic simulation’s same rules and
behaviors could adapt to a hexagonal grid with cells which, unlike the typical
implementation, are not just dead or alive but can have granular health, acting
like populations that grow and shrink.

Rules

Each cell takes on a “population value” from 0 to 1 and, at each simulation
step / generation, the population values surrounding a cell are summed.

This “surrounding population value” is then evaluated against these rules:

  • If this sum exceeds 3 or is below 2, the cell’s population value decrements by 0.1.
  • If this sum is in the range 2.5 to 3.5, the cell’s population value increases by 0.1.
  • All other values leave the cell’s population unchanged.

Visual Representation

A population value of 0 gives a cell a white fill color (for empty). Cells with
population values from 0.1 to 0.9 are grey and grow darker as their values get
larger. A population value of 1 (full capacity) receives a black fill.

Technologies and Resources Used

The entire solution runs in JavaScript (ECMAScript), targeting the HTML5 canvas element.
While not written in Processing, the solution draws on The Nature of Code by Daniel Shiffman.
The client side leverages jQuery, released under the MIT License.