Skip to content

Visualising Conway's Game of Life using p5 and Svelte

Notifications You must be signed in to change notification settings

mebble/gameoflife

Repository files navigation

Conway's Game of Life

CI Status Netlify Status

Live at cgof.netlify.app

Screenshot of the Game of Life demo

Challenges

  • Stateful DOM inputs such as seed selection and and toggle checkboxes retain their state after navigating forward and back from another page, but then fail to sync the svelte app state to the DOM state. Hence we end up with inconsistencies such as the seed being selected is different from the one being displayed in the canvas. Fix: Remove input autocomplete. Make a form element and apply this autocomplete=off to the entire form instead of applying it individually to each input. src: SO and MDN.

  • Getting a memory leak on the build tool:

    FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
    ...
    error Command failed with signal "SIGABRT".

    Node: v12.14.1 Rollup: v^2.3.4

    Fix: Don't know. But when process gets SIGABRT, it doesn't let go of the port 5000. We can make it do so using:

    lsof -i:5000
    kill -INT <process-id>
    

About

Visualising Conway's Game of Life using p5 and Svelte

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published