Falling sand
Sand piles. Water flows. Oil floats and burns. Seeds sprout. Draw whatever, then set it on fire — it's a sandbox.
Draw with the mouse or finger. Sand piles, water flows, oil floats and burns, seeds sprout on sand, fire makes smoke. Lava burns what it touches, turns water to steam and hardens to stone; acid eats through almost everything. Nothing is saved anywhere — it's a sandbox.
What each thing does
- Sand falls and settles into slopes. Wall never moves — draw containers.
- Water flows sideways and sinks below oil; it puts out fire.
- Oil floats on water and burns fast. Fire climbs, consumes oil and plants, and leaves smoke.
- Seeds fall like sand and sprout into plants when they rest on sand; plants grow slowly where water touches them.
Keys 1–7 pick the element, Space pauses. It runs as a cellular automaton (every cell follows a few local rules each frame) — the same idea as the classic falling-sand games from the early web. Nothing is saved unless you press Save.
All the materials
- Lava flows slowly, sets oil and plants on fire, and turns water into steam — cooling into stone where they meet.
- Acid eats sand, stone, plants and oil, using itself up as it goes; resting on water, it slowly dilutes into water.
- Stone stays put like a wall, but acid can dissolve it.
- Smoke rises and fades on its own.
Scenarios
- Volcano: a stone cone with a lava core and a pool of water at its foot — watch the obsidian crust form.
- Forest fire: a row of trees on sand, an oil puddle in the middle and fire at one edge. Draw a firebreak with the eraser or a water channel before it spreads.
- Rain: dunes, a ledge and a sky full of water.
How it works
The box is a 200 × 140 grid and every cell holds one material. Twice per frame each cell looks at its neighbours and follows a short rule — sand falls or slides diagonally, liquids also spread sideways, fire spreads to fuel and burns out without it. Rows are processed bottom-up, each in a random direction, so piles do not lean one way. Nothing more is needed for slopes, floods and wildfires to appear.
Questions
Keyboard shortcuts? Keys 1–9 choose materials in order, Space pauses.
Can I save it? "Save PNG" exports the grid at four times its size, pixel-sharp.