Short story featuring interactive Life simulations
Posted: February 7th, 2023, 5:57 pm
I’ve written a short story about a mother trying to understand her daughter’s fascination with Life: https://justinmanley.work/projects/lifestory. The text is interleaved with interactive Life simulations, mostly classic old patterns that everyone here will recognize: a Gosper glider gun, the r-pentomino, Kok’s galaxy, a Schick engine glider synthesis, gliders galore, and more (most of which I collected through spending wayyy too much time trawling the wonderful wiki!).
The page runs the interactive Life simulations using a custom TypeScript library written for the purpose. The library lays out patterns embedded throughout the text into a single unified Life grid, but only evolves cells when they are within the browser viewport. It also provides mechanisms for preventing patterns from getting corrupted when they pass into and out of the viewport (more details in this blog post).
I built the library for the short story, but it should also be useful for other purposes as well, if others want to use it to embed scrollable zero-UI Life simulations into tutorials or blog posts or other web-based texts (in addition to the short story, the library powers the blog post linked above).
It’s easy to get patterns into a page: they’re specified using RLE files (if you open the Network tab in Developer Tools while viewing the short story, you can see all the RLE files coming in). More details on how that works here.
I’m happy to answer questions if anyone has questions about the story or the library.
The page runs the interactive Life simulations using a custom TypeScript library written for the purpose. The library lays out patterns embedded throughout the text into a single unified Life grid, but only evolves cells when they are within the browser viewport. It also provides mechanisms for preventing patterns from getting corrupted when they pass into and out of the viewport (more details in this blog post).
I built the library for the short story, but it should also be useful for other purposes as well, if others want to use it to embed scrollable zero-UI Life simulations into tutorials or blog posts or other web-based texts (in addition to the short story, the library powers the blog post linked above).
It’s easy to get patterns into a page: they’re specified using RLE files (if you open the Network tab in Developer Tools while viewing the short story, you can see all the RLE files coming in). More details on how that works here.
I’m happy to answer questions if anyone has questions about the story or the library.