Coding Adventure: Ant and Slime Simulations

Sebastian Lague · 2.2M views · 2021 · 17:54

Open on YouTube

Creative coding & generative artComputer graphics & renderingdemo

Why Hacker News recommends it

HN recommends it as a beautiful example of what simple rules and compute shaders can produce, and many commenters were inspired by it.

What it is

Sebastian Lague explores an ant-inspired algorithm and simulates ant and slime mold behavior, using compute shaders. Source code for both simulations is available.

Recommended by 6 HN commenters across 5 different months, 2021 to 2024.

What Hacker News said

Strong rec ehsankia · 2021-04 · on “Time flies in Google Earth’s biggest update in years”

Speaking of ant and slime simulation, this recent video Coding Adventures video was pretty mind blowing: [this video] (Especially part 2 starting around 10m in).

Strong rec Udo · 2023-05 · on “Ze Frank True Facts: The Smartest Slime”

Sebastian Lague made an excellent video "Ant and Slime Simulations" which explores how path-finding algorithms can use trails and gradient-based signaling to solve spatial problems: [this video]

Strong rec Risord · 2024-08 · on “The secret inside One Million Checkboxes”

At the time I was lost joy of coding too but I was able to found it again. One key point was to ignore learning new tech if it was not absolutely necessary and focus just creating new things. I think it all started from Sebastian Lague's video which reminded how beautiful coding can be. [ [this video] ]

Recommends theossuary · 2021-03 · on “Show HN: Play with Shaders Inspired by Slime Mold”

This reminds me of a coding adventure YT video that replicates slime molds in Unity, look at the end to see some high res videos of it - [this video]

Recommends Berg0X00 · 2021-06 · on “Compute Shader 101 [video]”

Thanks for sharing this! I have not watched the full video yet but definitely will. Recently got interested in compute shaders thanks to this video: [this video] and can recommend it to those that want to see a bit of what is possible with compute shaders.

Recommends Nezteb · 2023-05 · on “Orb Farm”

I love ants and replicating their behavior in code! You might like these projects: "Coding Adventure: Ant and Slime Simulations" by Sebastian Lague: Video: [this video] Code [LINK] "C++ Ants Simulation 1, First approach" by Pezzza's Work: Video: [LINK] Code: [LINK]