Skip to content
← Back to Community
| S4ND | Super Satisfying Sand Simulator
Profile icon
h
has Hacker Plan
RayhanADev

Hiya 0/!

So I recently got a new profile pic, and I guess I made a new game as well (two very irrelevant things)? Anyways I always thought falling sand games were super satisfying, so I made this basic falling sand game! So here we go...

Presenting... S4ND

Water Included

demo

Want To Play It?

CLICK THIS LINK

You basically get to drop some sand, and it's super satisfying! Coding it took <canvas>, several ES6 Classes and I used external CSS (big wow right?).

ENJOY!

Voters
Profile icon
Architeutes503
Profile icon
DragonProgrammer
Profile icon
DhiazAlfazpoetr
Profile icon
Programming132
Profile icon
caa362
Profile icon
KevinMladshiy
Profile icon
JosephineAYF
Profile icon
Wera7
Profile icon
JustinLi14
Profile icon
CheytonMatheson
Comments
hotnewtop
Profile icon
FlaminHotValdez
  1. Epic project!
  2. Uh...The furret in your pfp is hidden by the hacker badge.
Profile icon
RayhanADev

@FlaminHotValdez

  1. Awesome, thanks!
  2. Ya :/, wish I could do something about it but I have haxer till october :>
Profile icon
Bookie0

oh my god look at these typos! xD

Screen Shot 2021-04-07 at 8.14.43 AM
Screen Shot 2021-04-07 at 8.15.00 AM
Screen Shot 2021-04-07 at 8.15.06 AM

lol really, as you tend to say it, kewl!

Screen Shot 2021-04-07 at 8.15.22 AM

I made an island. :)

edit: actually that's 2 islands! :)

Profile icon
RayhanADev

@Bookie0 lol i guss my gammar is just thath bad xD

also kewl

noice islands

Profile icon
Bookie0

@RayhanADev hoh i unredstand yuo (:
yes islands xD

Profile icon
RayhanADev
Profile icon
DynamicSquid

Awesome! Did you use a physics engine?

Profile icon
RayhanADev

@DynamicSquid thank you! and nope :), I just used some really simple math and random number generation, but the physics looks mildly realistic because of the small scale of the project!

Profile icon
DynamicSquid

@RayhanADev Nice! How did you do the collisions with the walls?

Profile icon
RayhanADev

@DynamicSquid the abridged version is I iterate through an array containing all the particles and check if the x/y points match up and stop it's descent. It gets a little more complicated on edge cases since at that point I have it randomly hop some distance to simulate the sand falling on the edges ;D. The one problem with my setup is the array can get huge and like someone mentioned it can get awfully laggy after some time but that's a-okay with me XD.

Profile icon
DynamicSquid

@RayhanADev Oh nice! Thanks for the explanation :)

Profile icon
RayhanADev

@DynamicSquid no problem :D, I'm actually happy that someone wants to know how it actually works lol

Profile icon
DynamicSquid

@RayhanADev This is random but you're Github page is actually really cool lol

Profile icon
RayhanADev

@DynamicSquid oh that, thank you :) I spent something like a 100 commits to make it look perfect definitely not a perfectionist here

Profile icon
MadMath123

@RayhanADev If you think about it, a rectangle like that is really 4 slopes.

Profile icon
RayhanADev
Profile icon
kwe

i love these sandbox type of games!

Profile icon
RayhanADev

@kwe YAY glad you like it :D

Profile icon
SleepySid

Here's my beach

image

Profile icon
RayhanADev

@SudhanshuMishra ooh pretty!

Profile icon
LegendaryWolf

POG

Profile icon
RayhanADev
Profile icon
KEREMDEMRZ
Profile icon
xXToluwaXx

My ocean
image
was destroyed
image
till it died
image
the one piece of sand XD pogchamp

Profile icon
RayhanADev

@xXToluwaXx wow, what a pogchamp indeed
now that's actually funny ngl xD

Profile icon
27whuang

So this is how god made earth huh

Profile icon
RayhanADev
Profile icon
rrrrobb

fun

Profile icon
RayhanADev

@rrrrobb thanks!

Profile icon
Whippingdot

is this how fisics works?
image

TRIPPY
image

Finally can you make a cool pfp for me too? The only thing is I have to be a black (racism) dot with MLG glasses on. Oh and if you want to join the MLG gang ( @Codemonkey51 & @ch1ck3n ) add MLG glasses to ur pfp.

Profile icon
Whippingdot

Oh an you can substitute glue with water
image
@Whippingdot

Profile icon
RayhanADev

@Whippingdot

  1. The physics in this game is crappy xD, I didn't put enough effort into it clearly
  2. Just follow the TikTok tutorials :). Go to https://picrew.me/ and make your own. The site is Japanese but you might understand enough of it.
  3. Hmmm, i may consider it lol
Profile icon
Whippingdot
Profile icon
ch1ck3n

@Whippingdot i have mlg glasses on my pfp

Profile icon
Whippingdot

i know i mentioned both of you cause both of you are in the MLG gang with me. Codemonkey founded it @ch1ck3n

Profile icon
ch1ck3n

@Whippingdot cool
i hereby accept your invitation to the mlg gang

Profile icon
Whippingdot

lul okay @ch1ck3n

Profile icon
svensk007

Cool project but the water doesn't have any inertia(neither does the sand but that's less noticeable)... Still epic though.

Profile icon
RayhanADev

@svensk007 thanks!, and yeah they don't this was really just a basic hack I didn't spend any huge amount of time trying to code in physics

Profile icon
svensk007

@RayhanADev xD I'm not gonna look in the code and I don't know JS but as far as physics goes I don't think any physics sims are happening. I just see the particles going straight down from wherever they are because the ramps are well, ramps and the particles would slide. The only thing being calculated is collisions I think, but correct me if I'm wrong.

Profile icon
RayhanADev

@svensk007 you're not :) I never mention any physics (I think) and I actually said I don't use a physics engine on this project just some math and rng. I looks mildly realistic because of the smaller scale of the project, but it's just sand falling.

Profile icon
svensk007

@RayhanADev yeah I said I didn't think any physics simulations were happening

Profile icon
StarletDevil

I love how the game gets rapidly slower as you go.
Also, Physics aren't real lmao
image

Profile icon
RayhanADev
Profile icon
StarletDevil

@RayhanADev Maybe make Water have no Sand collision, but Sand have Water collision.
So when water hits sand, the water isn't affected, but the sands like "Oh pardon you, I'm in the way."

Profile icon
RayhanADev

Super Satisfying 0w0!