Skip to content

Twizter01/SandSimulator-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sand Simulator

A pixel art sand simulation game created with Python and Pygame.

Features

  • 500x500 pixel grid for sand simulation
  • Sand falls with realistic physics
  • Sand color changes every 1.5 seconds when the mouse is pressed
  • Simple controls: click and hold to create sand
  • Save your sand creations as PNG images

Requirements

  • Python 3.6+
  • Pygame 2.0+

Installation

  1. Make sure you have Python installed
  2. Install dependencies:
    pip install -r requirements.txt
    

How to Run

python main.py

Controls

  • Click and hold: Create sand at mouse position
  • C key: Clear the canvas
  • S key: Save your creation as a PNG image

How it works

The simulator uses a simple grid-based physics system where:

  • Sand falls downward due to gravity
  • If blocked, sand tries to slide diagonally
  • Sand particles interact with each other to create natural-looking pile formations
  • Color changes every 1.5 seconds while the mouse is pressed

Enjoy creating beautiful sand art!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •