by hopfog · 9mo ago · 0 comments
I can highly recommend building your own falling sand simulator. It's really fun to see how such simple rules create emergent behaviors. Sand pixels try to move down, then diagonally down. Water does the same, then tries sideways.
Me messing around with it eventually resulted in a game I'm now working on full time (think Noita meets Factorio): https://store.steampowered.com/app/2764460/Sandustry/
The world is divided into chunks and the threads are processing them simultaneously in an even-odd checker pattern to avoid race conditions. When all pixels settle in a chunk it falls asleep and can be skipped altogether until an active pixel enters and wakes it up again.