from Hacker News

Show HN: WebGPU + TypeScript Slime Mold

by SuboptimalEng on 1/2/25, 4:37 PM with 11 comments

  • by modeless on 1/5/25, 1:23 AM

    I will never understand why people don't lead with the link to the live demo: https://suboptimaleng.github.io/slime-sim-webgpu/

    It's very cool!

  • by ripleyp on 1/5/25, 7:20 AM

    Very cool! I did a similar project last year. Really like how your result looks with the lighting setting on.

    The most interesting results I got were from having multiple "variants" and giving each variant parameters for their attraction to agents of their own/other type. Implementation-wise it was a variant tag for each agent and a matrix of attraction coefficients as a uniform. Playing with the params resulted in interesting behaviors, like one variant chasing another around while they both try to avoid a third.

    If you're looking for an addition to this project, I'd recommend giving it a try!

  • by miketahani on 1/5/25, 2:12 AM

    Super cool! I was experimenting with WebGPU and various simulations a couple months ago [1] and would love to learn more about your process! Do you have a blog or something similar?

    [1] https://observablehq.com/collection/@miketahani/slime

  • by namjh on 1/5/25, 2:58 AM

    Amazed that Safari does not support WebGPU even with the latest release. Opened Chrome and it works. Very cool demo!
  • by floating-io on 1/5/25, 2:59 AM

    I had to read that title several times to make sure that it wasn't the alcohol causing it to register as "Slime Mold."

    Why someone would want to simulate a slime mold is something I don't understand, but more power to ya. =)