Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.51 KB

README.md

File metadata and controls

46 lines (34 loc) · 1.51 KB

Sand Simulator ( C / C++ )

Description

This is a simple sand simulator written in C / C++ using the RAYLIB library. It is a simple program that simulates sand falling and piling up. It is a very simple program that I made to learn more about the RAYLIB library and to learn more about C / C++.

How to Compile

For the linux based distros, you can run the bash file to compile and run the program

git clone https://github.com/Sarthak950/SandSimulator.git 
cd SandSimulator
chmod +x compile.sh
./compile.sh

For the Windows

git clone https://github.com/Sarthak950/SandSimulator.git 
cd SandSimulator
g++ -O3 ./main.cpp -lraylib -lGL -lm -lpthread  -o main.exe
./main.exe

How to Use

The Controls are: Hold the W key and move the mouse to create water particles Hold the S key and move the mouse to create sand particles Hold the Space key and move the mouse to create walls Press BackSpace to clear the screen

Note

For contribution please open a pull request and I will review it.

  1. Fire, Lava Particle
  2. Gas particles Thanks.

Screenshots

2023-11-28_08-57-54.mp4

231128_08-54-37

231128_08-55-29

231128_08-57-33