a simple falling sand engine in unity
this code is a mess, because i cant code. you can use it for free, expand upon it, fix it (good luck), or anything without crediting i dont care. please make something epic <3 cheers!
features: simulation is split into chunks which are aligned to a tilemap tilemap can act as a collider or/and as the room boundary (draw tiles where you want the chunks to be)
chunks are smart, meaning they wont be processed if they arent active. Any particle that moves between frames sets its (and its neigbours, if on a chunk border) active status to true. implemented elements: "sand" - basic sand movement "water" - its colors is fucking ugly but its easy to tweak (use element's colorData array)
simulation supports: velocity dispersionRate (how fast fluids go horizontally) airDrag gravity interia (impact absorbs velocity, and translates it) density
planned features: bounciness airResistance mass friction (better than the current one)