Falling Sand Screensaver
This screensaver runs a real falling-sand cellular automaton, the classic "powder game" simulation style. Sand cells fall and pile up realistically, water cells flow and spread to find their level, and fire cells consume nearby flammable material and burn out — every cell following real simple physics rules each tick.
How the Falling Sand screensaver works
Every cell holds a material: empty, sand, water, or fire, each with its own real, simple falling-sand physics rule.
Sand falls straight down if the cell below is empty, otherwise slides diagonally if either lower-diagonal cell is empty — real granular pile behavior.
Water falls the same way but also spreads sideways into empty neighbors when it can't fall, so it genuinely flows and finds its level.
Fire spreads to flammable neighbors and burns out after a short real lifetime, leaving empty space behind — a real emitter periodically drops fresh sand and water into the scene.
From Sand Game to the powder-toy genre
Falling-sand games are a genre of sandbox in which a two-dimensional, cellular-automaton-style engine simulates materials interacting on a canvas. The first known popular example was a Japanese Java applet from 2005, later rehosted as the “Falling sand game”. Later titles in the genre include Powder Game (2007) and The Powder Toy (2010), and Noita (2020) combines the same style of physics with roguelike mechanics.
The central trick is that the whole simulation is a grid, and each cell only looks at the cells directly around it. Sand is a powder: it falls if the space below is free, otherwise tries the diagonals, which produces conical piles. Liquids add a sideways rule so they level out. Rules are applied in some scanning order, and a common trick is to alternate the direction of the sweep so that material does not drift to one side.
This is a simplification of real physics. There is no momentum or pressure here, and neighbouring material types follow simple preference orders. What is notable is how much lifelike behaviour emerges from such crude rules. Noita’s developer, Petri Purho, has described the approach in that game as “complex cellular automata”, and in that game almost every pixel is simulated.
A worked example
Watch a falling stream of sand pile into a real cone shape, exactly like real granular material, while a nearby pool of water flows sideways around any obstruction until it settles into a genuinely flat, level surface.
Settings & tips
- Sand color recolours the falling sand grains.
- Water and fire use their own fixed real colors so the material types stay visually distinct.
- The scene periodically clears and restarts once it fills up.
Frequently asked questions
- Is this the same style as classic "powder game" toys?
- Yes — it's the same cellular-automaton falling-sand simulation style, with sand, water and fire each following their own real local physics rule.
- Does the sand really pile up like real sand?
- Yes — each grain checks straight down first, then diagonally, which reproduces the real angle-of-repose piling behavior of granular material.
- Is a key needed?
- No — it's a pure local computation.
- Is it free?
- Yes — free, no download, in your browser.
- Why do the piles settle into the same shape?
- Grains only move down or diagonally down, so a pile stops growing when no cell below has a free diagonal. That gives a fixed slope, similar in spirit to the angle of repose of real sand.
- Why do cellular automaton sand games alternate scan direction?
- If cells are always processed left to right, material tends to bias one way. Flipping the direction each frame keeps motion more symmetrical.
- What games grew from this idea?
- Powder Game (2007), The Powder Toy (2010) and Noita (2020) are all in the family. Noita’s physics system is inspired by falling-sand games, and almost every pixel in it is simulated.