Skip to content

PradaJoaquin/sand-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sand Simulation

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!

sand_simulation

Controls

  • Spawn material:

    • mouse-left-click: spawns the selected material
  • Select material:

    • 1: selects Sand
    • 2: selects Water
    • 3: selects Stone
    • 4: selects Fire
    • 5: selects Wood
  • Brush size:

    • mouse-wheel-up: enlarge the brush radius
    • mouse-wheel-down: shrink the brush radius
  • Delete with brush:

    • mouse-right-click: deletes with brush
  • Delete all:

    • R: Deletes all the canvas

DEBUG

  • Print the selected cell info:
    • If debug mode is active, mouse-middle-click prints the selected cells info.

Installation to run

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

Releases

No releases published

Packages

No packages published

Languages