Sand simulation made with pygame.
In this sand simulation you can spawn up to 5 materials: Sand, Water, Stone, Fire & Wood. They interact and behave with each other in different ways, try it yourself!
-
Spawn material:
mouse-left-click
: spawns the selected material
-
Select material:
1
: selects Sand2
: selects Water3
: selects Stone4
: selects Fire5
: selects Wood
-
Brush size:
mouse-wheel-up
: enlarge the brush radiusmouse-wheel-down
: shrink the brush radius
-
Delete with brush:
mouse-right-click
: deletes with brush
-
Delete all:
R
: Deletes all the canvas
- Print the selected cell info:
- If debug mode is active,
mouse-middle-click
prints the selected cells info.
- If debug mode is active,
To run the simulation first download python if you don't have it.
Then download the repository and install the dependencies, inside the simulation folder, with:
pip install -r requirements.txt
Finally run the simulation with:
python3 src/main.py