Clever Quest Lab ← Labs

Falling Sand

Pour sand, water, lava and ten other materials, then watch them fall, flow, burn, melt and react.

Running 0 particles
Materials
Tool
4
Speed
Presets
Scene

Drag on the canvas to draw, right-drag to erase. Spout places a source that keeps pouring; a spout made with the Eraser is a drain.

How to play

Pick a material in the palette and drag on the dark canvas to pour it in. Every cell of the grid holds one grain of something, and a few local rules decide how it moves and reacts with its neighbours: sand piles up, water finds its level, oil floats, wood burns and lava hardens in water. There is no score and no way to lose.

Start with a preset, then build your own scenes. Brush draws freely. Spout places a source that keeps pouring the selected material; with the Eraser selected it places a drain instead. Pause while you build and use Step to advance one tick at a time. The number under each material counts its grains on the canvas.

Controls

Rules of the materials

The physics behind it

The canvas is a grid of cells (200 × 150 on wide screens, 120 columns on phones) updated 60 times per second at normal speed. Each step visits the rows from the bottom up, so a grain can fall into a space that was just vacated. Alternating the direction along each row and skipping grains that already moved keeps the motion free of a left or right bias.

Movement is ruled by density. A grain may swap places with a lighter liquid or gas below it, a simple form of buoyancy: sand sinks, oil ends up above water and steam bubbles climb through a lake. Real dry sand settles at roughly 30 to 35 degrees; here a grain moves at most one cell sideways per cell of fall, so heaps settle at 45 degrees.

Falling grains alone do not feel pressure, so water poured into one arm of a U-tube would stay there. To model hydrostatic pressure, the simulator regularly moves a grain from the highest surface of each connected body of still liquid to the lowest free space touching it. This is the principle of communicating vessels: a connected liquid at rest has one level.

Reactions are local too, and a change of state turns one cell into exactly one other: steam becomes one drop of water, lava meeting water becomes stone plus steam. Plain movement only swaps grains, so a closed scene of sand and water keeps exactly the same number of each.

Tips and strategy

Frequently asked questions

Can I win or lose?

No. It is a sandbox for experiments and exploring.

Does it work on a phone?

Yes. Phones get a narrower grid that fits the screen, and it works offline once the page has loaded.

Does the simulator conserve mass?

For inert materials, yes: moving grains only swap places, so sand and water counts stay constant in a closed scene.

Is my scene saved?

It is stored in your browser when you leave the page and restored next time. Save scene keeps a separate copy until you save again.

More free games