Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Falling sand sandbox

Draw sand, water, oil, stone, wood, plants and fire and watch them fall, flow, float, grow and burn in a cellular automaton sandbox.

How to use

  1. Pick a material and a brush size, then draw on the field with the mouse, a pen or a finger. Things start falling straight away.
  2. Try a ready-made scene: an hourglass of sand, oil and water, a forest fire, or a garden in the rain.
  3. Pause and Step let you watch one step at a time. Clear empties the field.
  4. The line under the field counts every material, so you can check what fire used up or how much the plants grew.

Keyboard and touch

Space or PPlay or pause (when no button or box has focus)
TabMove between the controls; choose a scene to start without drawing
Drag on the fieldDraw with the chosen material

Tips

  • Pour sand into water: it sinks to the bottom, because sand is heavier.
  • Oil floats on water, and burns. Drop fire on an oil slick floating on a pond.
  • Build stone walls first to make cups, funnels and channels for water.
  • Plants slowly turn neighbouring water into more plant. Wood burns slowly, plants faster, oil fastest.
  • Sand forms piles with sloping sides because each grain that cannot fall straight down tries one diagonal and then the other.

About this sandbox

Falling-sand games are cellular automata: the field is a grid, every cell holds one material, and each step every cell follows a few rules about its neighbours. Here the grid is updated from the bottom row up, and each row alternately left to right and right to left, so nothing drifts to one side. Sand falls if the cell below is empty or holds a liquid, otherwise it slides diagonally. Water and oil also flow sideways, and water sinks below oil. Fire sets fire to wood (5 % chance per step for each neighbour), plants (8 %) and oil (25 %), stays put while it has fuel, otherwise drifts up, goes out next to water and leaves smoke; smoke rises and fades. Plants turn water next to them into plant with a 4 % chance per step. The random choices use a seeded generator, so a scene with the same seed always plays out the same way. It is a toy model of materials, not a physics simulation. Everything runs in your browser.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product