Skip to content

Hurtak/game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game of Life

Game of life written ES2015 and Redux

Demo

http://hurtak.github.io/game-of-life/

Features

Nice interface Game of life interface preview

Plenty of patterns to play with Menu with patterns

Stats (hidden feature, activate it by clicking on the 'Game of Life' heading) Stats

Technology overview

Development & Compilation

Prerequisites

  • Node.js is required
  • install dependencies with npm install

Development mode

  • npm run dev compile app in development mode and start web server with live reload

Production mode

  • npm run dist compile app in production mode and start web server

Benchmark

  • tests how long it takes to recalculate world state
  • located in ./app/scripts/benchmark/ directory
  • easiest way to run it is to uncomment benchmark import in ./app/scripts/app.js, start the app and look into browser console
  • you can tune settings (number of iterations, tested world size) in ./app/scripts/benchmark/benchmark.js

Scripts for downloading game of life patterns

  • located in ./scripts/download-patterns-from-wiki.js
  • run with node node ./scripts/download-patterns-from-wiki.js
  • downloads patterns into ./scripts/data/ directory

TODO / Potential improvements

  • Add help screen to explain what is going on
  • improve performance
  • add tooltip to cursor patterns
  • selected cursor highlight in cursors menu
  • close button inside cursors menu?
  • save state to localstorage?
  • save world to url?
  • draw already visited cells with different color (fade out this color after some time)
  • use setTimeout based timer instead of setInterval?
  • use requestAnimationFrame?
  • world recalculation in service worker?

About

Game of life written ES2015 and Redux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published