Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.77 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.77 KB

Game of life

Rust WebAssembly JavaScript HTML

A web app implementing the game of life, done in Rust + WebAssembly + Js, following the community's guide.

In order to compare performances, the calculation is implemented both in pure JS and in Rust/Wasm, switch between the two by clicking the logo in the top-left !

Play with it here.

Features

  • It runs fast (fps counter included)
  • Wrapping universe (cells on the left/top border are neighbours to those on the right/bottom border)
  • Play/Pause simulation at anytime.
  • Slider to control the simulation speed.
  • Reset or clear the board.
  • Click to change a cell state, ctrl-click to create a glider, shift-clitk to create a pulsar
  • Modify the board size and cell size
  • Optionally resets the board after some time or when it is dead

Features I'd like to implement

Features

  • Select menu to select shape added on ctrl and maj-click
  • Rotate shapes
  • Go back in time (highly unrealistic right now !)

Optimisation

  • Transition from canvas to webGL for rendering
  • Remove allocation of vectors at each universe tick
  • Return list of deltas instead of a whole univers with each tick
  • Instantiate only a single universe to remove all dynamic allocation.