A simple falling sand simulation in C using SDL2.
- Left-click to place sand.
- Hold Shift while clicking to place walls.
- Hold Command/Windows while clicking to place water.
- Hold Alt while clicking to erase.
- Real-time sand and water physics.
- Install SDL2 development libraries.
- Clone this repository.
- Compile:
cd build/ && cmake .. && cmake --build . - Run:
./falling_sand
- Left Mouse Drag: Draw sand
- Shift + Drag: Draw wall
- Command/Win + Drag: Draw water
- Alt + Drag: Erase
Enjoy playing with the falling sand!