SimulatorEntertainmentEducationBrain

Sand Physics Simulator

Free online powder toy & falling sand simulator — no install, no signup. Paint sand, water, fire, lava, TNT, gunpowder, electric wires and more; watch realistic cellular-automaton physics react in real time. 100% browser, free web version.

A free sandbox physics simulator — runs in your browser

Open the page, pick a material, and start painting. Sand piles up, water flows, lava melts ice into steam and sets into rock as it cools, fire spreads along oil, TNT chain-detonates, and current travels down metal wires. Every pixel is a cell with a material type and a few simple rules — the rich behavior emerges from millions of local interactions per frame.

The genre was popularized by Dofi's Falling Sand Game (2005), The Powder Toy (2008), and the gorgeous browser game Sandspiel (2018). This page takes the same DNA and ships it as a zero-friction web tool: no install, no signup, no upload — everything runs locally on your device.

Material guide

MaterialPhaseBehavior
Sand / Dirt / Stone / SaltPowderFalls, slides diagonally into gaps, forms heaps. Salt dissolves in water; dirt grows plants when seeds and water are present. Heat them past 800°C and they liquefy — salt into molten salt, stone into lava, and sand mostly into lava too, with only a small fraction melting cleanly enough to become molten glass.
Rock / ConcreteSolid (brittle)Structural blocks that hold their shape instead of trickling away — build cliffs, walls and floors with them. An explosion cracks them, and cracked cells stop being structural and fall as rubble. Rock isn't a separate substance at all: it is stone in its consolidated state, so blasting bedrock apart leaves an ordinary heap of loose stone, and both forms melt to lava at the same temperature.
Water / Oil / Acid / MercuryLiquidLiquids layer by density — oil floats on water, acid sinks through it, mercury is the densest and sits under everything else. Acid corrodes most solids over time, but not glass — which is exactly why real acid ships in glass bottles.
LavaLiquid (hot)Molten rock — flows thickly, ignites wood, plants and oil. Touching water flashes the water into steam and chills the lava below its freezing point, where it sets: into solid bedrock where a flow pools on something firm, into loose scree where it freezes mid-fall with nothing underneath. Its heat is also what melts nearby sand, though any heat source hot enough will do the same.
FireGas (short-lived)Rises, fades over ~70 frames, ignites flammable neighbors. Dies into smoke or vapor.
Smoke / SteamGasBoth rise and drift. Steam condenses back to water as it cools; smoke just fades.
Wood / CoalSolid / PowderBoth need air access to burn — submerge them in water or surround with non-flammables and they refuse to ignite. Coal burns slow and hot once lit.
Plant / SeedSolid (growing)Drop a Seed onto dirt near water and it sprouts into Plant. Plant cells spread into adjacent dirt over time. Very flammable.
Ice / SnowSolid / PowderCold materials. Snow falls light; both melt to water when heated.
Metal / SparkConductor / CurrentPaint Metal to draw wires. Drop a Spark anywhere on the wire and current propagates along the metal, heating it (Joule heating) and igniting flammables or detonating explosives at the end.
Gunpowder / TNTExplosiveGunpowder is a powder fuse (radius 12 explosion). TNT is a heavy charge (radius 30). Both ignite from fire, lava, or hot metal, and chain-detonate other nearby charges.
Uranium / PlutoniumFissileHeavy powders that fission on neutron impact or when heated above their threshold (2500°C for uranium, 2000°C for plutonium). Each fission dumps thousands of degrees of heat, primes adjacent fuel cells, emits 2–3 new neutrons and leaves Fallout. A large enough block becomes critical and chain-reacts.
NeutronParticleFree-flying particle, ~2 cells/frame. Passes through air, fire, smoke, steam and glass; scatters off most matter; triggers fission on contact with uranium/plutonium and fusion on pre-heated deuterium. Absorbed by lead and walls.
DeuteriumFusion fuelSolid hydrogen isotope. Inert at normal temperatures; once heated past 2500°C (only a fission primary can do this) it undergoes fusion, vanishing cleanly while releasing a flood of neutrons. The basis of the neutron-bomb secondary stage.
FalloutResidueLight radioactive powder left behind by each fission event. Emits a trickle of residual heat and slowly decays back to sand. Settles as light dust on top of heavier debris.
LeadSolid (shield)Dense, inert solid that absorbs incoming neutrons — paint a wall of lead between a bomb and a target to block the radiation flux entirely.
Glass / WallSolidGlass never gets painted into existence in a real run — it sets out of a molten-glass pool, which itself only appears when sand melts and happens to vitrify. Reheat it and it goes back to a melt, so a shattered pane can be melted down and re-cast intact. It is also the only material acid won't touch, which makes it the one thing you can build an acid-tight tank from. Wall is indestructible — use it to build containers and obstacles.
SourceEmitterAn infinite well — tap the Source palette, then pick which material it emits. Spawns the chosen material into adjacent empty cells, forever. Great for waterfalls, lava flows, oil leaks.

Scene presets

Tap the preset icon in the toolbar to load any of these ready-made scenes.

Wood forest

Rolling dirt terrain, a deep central pond, and wooden trunks rooted in the soil. Light it on fire, drop in a seed, or just watch.

Boiling pot

A metal pot full of water sits on a smouldering coal pile. The edge coals are pre-ignited; heat creeps in, the water eventually flashes to steam.

Sprouting riverbed

A central river between sandy banks layered over dirt. Water seeps up through the sand cap, reaching seeds scattered along the banks — those rooted in dirt grow trunks, those on sand creep as plants.

Spark circuit

A U-shaped metal wire wired to a TNT charge through a wood fuse. A single spark at the start propagates around the loop and triggers the explosion.

Volcano

A stone cone with a super-heated magma chamber and chimney inside, with coal seams sprinkled through the bedrock. A sustained 1900°C lava source replenishes the eruption indefinitely; nearby coal ignites and billows smoke up the vent, and trees on the surrounding flatlands eventually catch fire.

TNT demolition

A three-storey timber building on a stone foundation, with TNT charges on each floor connected by a long gunpowder fuse. The fuse ignites from the far end and the cascade collapses the structure.

Waterfall

A three-step stone cliff with a continuous water source at the top. Water cascades down into a pool with dirt banks where plants grow.

Atomic bomb

A dense uranium sphere resting on a stone floor with a single primer neutron flying in from the right. On contact the whole sphere goes critical, cascades across a few frames, and detonates in a fallout-coated fireball.

Neutron bomb

Two-stage device — a small uranium primary wrapped in a deuterium secondary, ringed by stone buildings and wooden trees. The fission ignition heats the deuterium past its fusion threshold, and the resulting neutron flux sails right through the surrounding structures.

Toolbar reference

  • Pause / Play. Freezes the simulation without losing state — paint a precise scene, then resume.
  • Speed. Discrete 0.25× — 4× steps. Below 1× runs the simulation every N frames; above 1× runs multiple sim ticks per frame to fast-forward.
  • Brush. 1 — 20 pixel radius. Small for precise lines, large for flooding regions.
  • Save / Load. Snapshots are kept in your browser's localStorage with a name of your choice. Reload anytime, delete the ones you don't need. Saves don't leave your device.
  • Preset. The six ready-made scenes listed above.
  • Clear. Resets the grid to walls-only.
  • Heatmap. Switches the rendering to a temperature view — cold cells are blue, hot cells are red, useful for debugging heat flow.
  • Screenshot. Exports a 3× upscaled PNG of the current frame.
  • Canvas size. Three sizes (S 220×140, M 330×210, L 440×280) and a landscape ↔ portrait toggle. Changing dimensions resets the scene.
  • Fullscreen. Native fullscreen where supported, CSS fallback on iOS Safari.

How the simulation works

The grid is stored as parallel typed arrays: a Uint8Array for material ID, another for per-cell metadata (fire lifetime, decay timer, source-emit material), a Float32Array for temperature, and two Int16Array for per-cell velocity. Each frame the engine walks the grid, alternating horizontal direction to remove left-bias, and applies the rule for whichever material occupies each cell.

Heat is a separate pass — conductivity and heat capacity vary per material, so metal heats up fast and water resists temperature change. Phase changes (water ↔ steam, ice → water) and combustion thresholds (wood ignites at ~250°C with air access; coal at ~400°C) are driven by the temperature grid. Explosions inject heat and velocity into a radius and let normal physics handle the debris flight.

All of this runs on the main thread — no WebAssembly, no GPU, no workers. Painting writes into the same buffers, rendering produces a single ImageData blit per frame.

Nuclear chain reactions

Fission and fusion ride on top of the same heat and particle simulation as everything else, so “critical mass” isn't hard-coded — it emerges from how heat and neutrons propagate through fuel. A uranium cell that takes a neutron hit fissions: dumps ~3000°C into its own cell, primes its eight neighbours just above the fission threshold, emits 2–3 fresh neutrons in random directions, and leaves a fallout cell behind. The primed neighbours fission on the next heat-pass iteration, and the cascade ripples outward through the block.

A small uranium chunk leaks too many neutrons through its surface to sustain the reaction — it'll heat up and partially fission, but it fizzles. Cross a critical-radius threshold (roughly 6–8 cells) and the chain is self-sustaining: every fission emits enough neutrons to find a new fuel cell before they escape. Wrap the assembly in lead and the neutrons are absorbed at the boundary; wrap it in deuterium and the fission's heat triggers fusion, releasing a much higher neutron flux that punches through stone and metal walls — the classic neutron-bomb signature.

Privacy

The simulation runs entirely in your browser. Saves are stored in localStorage on your device. Nothing is uploaded; the screenshot PNG is generated locally on the canvas.