Sand/water simulation

Number keys to select type
Mouse button to place type

I decided to make a sandbox simulation because I thought it'd be fun and in sayochi's version sand doesn't fall down slopes.

https://snap.berkeley.edu/snap/snap.html#present:Username=pumpkinhead&ProjectName=sand%20box

This a project that simulates sand and water (and oil I guess, it's just water but colored differently and goes up when in water). However, the program isn't as fast as I'd like it to be, and there are some quirks that happen when there is a stream of particles. I am not sure how to help with both of these problems, so I would appreciate any help.

Interesting, good simulation !

Not to sound mean, but this looks a lot like griffpatch's simulation. Did you use all your own code?

yes i did code all of this by myself (did you try comparing griffpatch's code to the code in this project?). but i did take inspiration from griffpatch's version, with the inclusion of water. but there are other games/apps like this, not just griffpatch's version.

i just found out they're called "falling-sand games"