Giter VIP home page Giter VIP logo

game-of-life-3d's Introduction

Game of Life 3D

3D implementation of Conway's Game of Life in Processing

First screenshot of GameOfLife3D Second screenshot of GameOfLife3D

Controls

p - Resume/pause the simulation
c - Clear the grid
r - Randomise the grid (generate a new seed)
j - Rotate the grid left
k - Rotate the grid right
h - Zoom the camera in
l - Zoom the camera out
q - Quit

Parameters

Modify the following in GameOfLife3D.pde to your preferences:

  • ANIMATION_DELAY (default: 100)
  • GRID_WIDTH (default: 32)
  • GRID_HEIGHT (default: 32)
  • GRID_DEPTH (default: 32)
  • CELL_CHANCE_TO_LIVE (default: 5)
    • Relevant only when randomising the grid
    • Must be greater than 0
    • 1 = 100%, 2 = 50%, 4 = 25%, etc.
  • CELL_SIZE (default: 5)
  • NEIGHBOUR_MAXIMUM (default: 17)
  • NEIGHBOUR_MINIMUM (default: 7)
  • NEIGHBOUR_REPRODUCTION (default: 8)

Rules

  • Live cells with less than 7 neighbours die of underpopulation.
  • Live cells with more than 17 neighbours die of overpopulation.
  • Dead cells with 8 neighbours live by reproduction.
  • Live cells with 7 to 17 neighbours live on to the next generation.

The current rules result in a mostly full grid.

Reference

Note

  • The simulation starts with a random seed.

License

MIT License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.