Settings

Theme

Show HN: WebGPU + TypeScript Slime Mold

github.com

71 points by SuboptimalEng a year ago · 11 comments

Reader

modeless a year ago

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!

  • jamiejquinn a year ago

    I browse HN on a mobile device so personally, I appreciate seeing a few images and technical details before deciding to thrash my battery on a demo.

  • SuboptimalEngOP a year ago

    Thanks! I didn't use the link with the live demo because it doesn't run on all devices.

ripleyp a year ago

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!

miketahani a year ago

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

namjh a year ago

Amazed that Safari does not support WebGPU even with the latest release. Opened Chrome and it works. Very cool demo!

  • dannygarcia a year ago

    Unfortunately not out of the box but the demo runs really well on M4 chips. It can be enabled as such (I'm on Sequoia): 1. Safari > Settings > Advanced > Show features for web developers 2. Develop > Feature Flags > Search for WebGPU

    Safari Tech Preview may have it enabled by default.

  • 77pt77 a year ago

    Apple quality at its peak.

    Just like iphones get the latest/newest features after top of the line Androids.

    • pjmlp a year ago

      Just like Firefox and Chrome on GNU/Linux, yet another example of "Works best on Chrome" TM.

  • nox101 a year ago

    it works in Safari on both Mac and iOS but you have to enable WebGPU in the settings as Safari has not yet shipped it.

    Unfortunately, the demo itself is not responsive to the screen size.

floating-io a year ago

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. =)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection