Wow! This thread brings back some fond memories. Long ago, I came across a tiny Java applet linked on Fark to a Japanese forum post. Everyone loved it but I found it annoyingly small. It was barely 300px x 400px. I had been coding my senior thesis in Java and had recently learned how to use a Java decompiler.<p>So I downloaded the applet, decompiled it, spent a few minutes figuring out exactly where the dimensions were setup, changed them to 960x640, compiled it all, and hosted it on my site: <a href="http://chir.ag/stuff/sand/" rel="nofollow">http://chir.ag/stuff/sand/</a><p>I'm always apprehensive about taking any credit for the Falling Sand Game because I DID NOT make it but I'm always glad to see it in the wild. First it was Fark, then a few months later Digg, then Reddit. At one point someone created a Wikipedia page linking to the enlarged version I was hosting, then it got deleted as not-notable, then someone wrote a song about FSG, then a hundred different versions of FSG popped up, many non-Java and functioning much better than the applet, then the Wikipedia page came back up.<p>I've long stopped getting giddy emails from office slackers about how much time they waste on my site but even though I didn't really create this amazing game/toy/zen-garden, I feel lucky to have been a tiny part of the arcane pop-culture movement.
A nice bit of web programming. The smoke effects look cool. Pity solids don't conduct heat - the first thing I always try and do in these is boil a pot of water.<p>If you've never seen this kind of thing before, the canonical PC example is The Powder Toy, which is so amazing I wish there a 3D Minecraft-like version. But it's really CPU-heavy even in 2d.
This is great, I love falling sand games.<p>The only downfall is that the Pythagorean Cup didn't work?<p><a href="https://i.imgur.com/ejqBwR4.png" rel="nofollow">https://i.imgur.com/ejqBwR4.png</a><p><a href="https://sandspiel.club/#cCZB5Un0exri2UajMjcu" rel="nofollow">https://sandspiel.club/#cCZB5Un0exri2UajMjcu</a>
Several years ago I wrote a falling sand game for the Parallax Propeller chip, which is an 8-core microcontroller. One core was needed to drive the video output, and I had up to 7 other cores running a simple ruleset:<p>1. If a sand pixel had an empty pixel below it, exchange them.
2. If more than two sand pixels are stacked but there's space to the side, kick one sand grain out to that side.<p>These rules were enough to make the sand form simple hill shapes. All of the cores bash on the same shared memory array; rather than use locks or synchronization I just had each core start in a different column of the screen and all move left to right by columns - in theory there should be enough separation that they'd never conflict.<p>However - and this is the part I thought interesting to post about - somehow after a few seconds or minutes the 7 cores would catch up with each other and start running in lockstep (effectively reducing the speed of the simulation to equivalent of 1 core).<p>Barring a bug that was simply crashing cores, what I think was happening was that not every control flow path took the same number of cycles, so a core processing a column with a complex sand pattern might slow down and allow another core to catch up to it. Once two cores were operating on exactly the same data, they'd be doing the same deterministic logic on the same inputs and writing out the same result, effectively just duplicating the work in lockstep.
I wasted hours on these types of games back in the flash era, people were constantly releasing new ones with more types of sand and various effects and combinations, its a shame that whole segment of internet history was deprecated along with flash, good times.
What's the performance difference from a pure JavaScript version?<p>Recently, I made a particle game which originally planned to be implemented with WASM. However, I decided to implement it with pure JS firstly. The result is some surprising that the JS version runs so smoothly that I think a WASM version is not essential any more.
This brings to mind a game that many people here might enjoy once it gets released – Noita: a magical action roguelite where every pixel is physically simulated.<p><a href="https://store.steampowered.com/app/881100/Noita/" rel="nofollow">https://store.steampowered.com/app/881100/Noita/</a><p>(Disclosure: it's being developed by a bunch of my old co-workers.)
Brings me back some good old memories from this game:<p><a href="https://dan-ball.jp/en/javagame/dust/" rel="nofollow">https://dan-ball.jp/en/javagame/dust/</a>
Got tired of all the phalic-volcanoes so I made something nice for you <a href="https://sandspiel.club/#2scDpZpyMACGp65FrkPT" rel="nofollow">https://sandspiel.club/#2scDpZpyMACGp65FrkPT</a>
This very strongly reminds me of a game called "Hydroxis" (or at least I think so) for the Amiga. You started with water pooling in some cavity in an otherwise static level and had to move it to a target location by means of enabling and disabling some blocking segments in the level. That was fun!<p>I had remembered that one a decade or so ago and it turned out to be the single hardest thing I tried to find for my WinUAE collection :-(
Grow some plants. Light a fire. Frantically try to put it out with water and watch helplessly as the plants grow due to water, providing more and more fuel for the growing flames, until you have an unstoppable conflagration on your hands. There must be some moral lesson to learn from this.
Make a lake of oil, set it aflame and then pour water on it. A small amount of water causes the burning oil to flare and spread. A large amount of water extinguishes the fire. Very cool!
I wish fire or lava would make steam out of water, but I love the smoke effect. It was a really nice surprise when the rest of it was so low resolution, great combo.
If you like this game, you might find this project interesting:<p><a href="http://tinlizzie.org/~ohshima/shadama2/live2017/" rel="nofollow">http://tinlizzie.org/~ohshima/shadama2/live2017/</a><p><a href="http://tinlizzie.org/~ohshima/shadama2/" rel="nofollow">http://tinlizzie.org/~ohshima/shadama2/</a><p>It's a bit similar, but uses GPU and spawns millions of particles. On the other hand, it's less of a sandbox and more of a demo. You can write your own code in the browser too, but it's a bit tricky to program, because it compiles to shader language and it has some weird limitations.
This is awesome! A few years ago I built a more rudimentary version of a falling sand game with just Javascript and WebGL: <a href="http://ericleong.me/sand.js/" rel="nofollow">http://ericleong.me/sand.js/</a><p>I tried to embed the "scripting" language as a texture in WebGL to keep the implementation very fast (note that every pixel is a cell), but I think I worked myself into a corner.<p>Source code here: <a href="https://github.com/ericleong/sand.js" rel="nofollow">https://github.com/ericleong/sand.js</a>
Once I realized that pausing the FSG was a thing...<p><a href="https://sandspiel.club/#Mt35KuNUFTZW9ITyWDxe" rel="nofollow">https://sandspiel.club/#Mt35KuNUFTZW9ITyWDxe</a>
This is a perfect example of why I'm still in Chrome. At least for me this runs at 60fps in Chrome on my Mac but 30-45 in Firefox. I see this often in animated sites.
Love the performance, no trouble with 60fps. The swirly wind, fire, and smoke effects are beautiful! It’s also the only part here with which I would not know how to get started building, could anyone share their thoughts on the implementation?
Holy shit, I remember playing something very similar to this for hours on end in the early 90s as a kid; it might have even been an early version of the powder toy (another user mentioned it), not entirely sure, but regardless this thread is making me go back down memory lane and now I'd love to get into the insides of a game like this one and understand how it works!
You can create a little self-sustaining motion with a cloner covered in something that falls over a lake of acid.<p><a href="https://sandspiel.club/#IbQHF3edJmCy1dLJAWO8" rel="nofollow">https://sandspiel.club/#IbQHF3edJmCy1dLJAWO8</a>
I remember watching Confetti Factory on After Dark, which I think of as a primitive precursor to this. Must have been very early 1990s. Any earlier examples?
I love fungus. It makes the plant grow. Pour some acid on it, it will regrow! On the other hand, fire is pretty destructive.<p>You know what feature I miss? Fast-forwarding!
Is it really a "game" if there's no goal or "win" condition? Or is it a "webtoy" or "simulation" (or... "sandbox". Think it's a sandbox).
<a href="https://sandspiel.club/#A6xPmAP4TSEpcwThAFSB" rel="nofollow">https://sandspiel.club/#A6xPmAP4TSEpcwThAFSB</a><p>erase the thingy to the right, and the planets on the left grow upwards again.