Falling Sand Game — Powder Toy Simulator Online

Draw sand, water, snow, fire, stone and wood in your browser. Watch real cellular automaton physics: gravity, flow, burning and snowfall — no download, completely private.

Brush: 60 fps

Click or drag to draw · On mobile, drag with finger · Tilt your device to change gravity direction

How it works

The simulation runs as a cellular automaton on a pixel grid. Every frame, each cell checks its neighbours and applies a simple rule set:

Sand (granular) Falls straight down, then slides diagonally left or right if blocked. Piles up realistically and displaces water.
Water (fluid) Falls, then spreads horizontally in both directions, seeking the lowest free space. Extinguishes fire.
Fire & Wood (combustion) Fire rises (hot gas), ignites adjacent wood, fades to smoke/ember after a lifetime counter expires. Wood burns into ash.
Snow (phase change) Falls and piles like sand. Touching fire converts it to water. Accumulates on cold surfaces.
Stone (solid) Never moves. Acts as a permanent barrier. Perfect for building walls, channels and containers.
Device tilt (mobile) The DeviceOrientation API reads your phone's gyroscope and rotates the gravity vector, so particles flow in the direction you tilt.

The entire simulation runs in your browser with Canvas 2D — no server, no upload, no data sent anywhere. Frame rate targets 60 fps on modern hardware; the grid auto-scales to fit your screen.

Frequently asked questions

What is a falling sand game / powder toy simulator?
A falling sand game is a type of real-time physics sandbox where you paint different materials — sand, water, fire, oil — onto a grid and watch them interact. The original "Falling Sand" applet appeared around 2005 and inspired many successors including The Powder Toy (2008), Sandspiel, and countless browser versions. The core mechanic is a cellular automaton: each pixel checks its neighbours every frame and updates according to simple rules. The emergent complexity (dunes, floods, wildfires) comes from thousands of those simple rules running in parallel.
How do I use this powder toy simulator?
Select a material from the toolbar, then click or drag on the canvas to place particles. Adjust the brush size slider to paint larger areas. Use the Pause button to freeze the simulation and draw structures without them moving. The Clear button resets the grid. On a phone or tablet, drag with your finger; tilt the device to change the direction gravity pulls the particles.
How does the tilt / gravity feature work?
When you first visit on a mobile device the page may ask permission to use the gyroscope. Once granted, the DeviceOrientationEvent API reads the device's beta (front-back tilt) and gamma (left-right tilt) angles and converts them into an (x, y) gravity vector. Particles then fall in that direction rather than straight down, so tilting left makes sand slide left and tilting forward makes everything cascade toward the bottom edge. On desktop the gravity is always downward.
Does this run offline? Is my data private?
Yes and yes. The simulation is 100% client-side — pure JavaScript + Canvas. No data is sent to any server. Once the page has loaded it works without an internet connection. Nothing you draw is recorded or stored anywhere outside your browser tab.
Can I save or share my creation?
Right-click the canvas and choose "Save image as…" to download a PNG snapshot of the current frame. Full save/load of simulation state is not implemented in this version — the focus is on instant, frictionless play without accounts or files.