
Writing Conway's Game of Life With Uint8Array and Canvas, Including a Gosper Glider Gun
Writing Conway's Game of Life With Uint8Array and Canvas, Including a Gosper Glider Gun Conway's rules fit in three lines. Writing them and watching a glider chase itself across the grid — still a what have I just witnessed moment every single time. This version uses a typed array for the grid, canvas for rendering, and ships eight preset patterns so you can jump straight to the Gosper Glider Gun. Everyone's written Life at some point. I wrote it again because I wanted to do it carefully — typed arrays, toroidal wrap, a proper render loop — and bundle the classic patterns so you don't have to hand-place cells to see something interesting. 🔗 Live demo : https://sen.ltd/portfolio/game-of-life/ 📦 GitHub : https://github.com/sen-ltd/game-of-life Canvas in the middle, control panel below. Eight presets (Glider, Blinker, Toad, Beacon, Pulsar, LWSS, R-pentomino, Gosper Glider Gun), click-to-edit cells, 1–60 steps/sec, generation + live-cell counters, play/pause/step/reset/clear. Vanilla JS, z
Continue reading on Dev.to
Opens in a new tab


