Meet Sandlera, a falling-sand thermal automaton
Falling Sand Toy now opens Sandlera, a 320-by-200-cell simulation in which powders, liquids, gases, fixed structures, heat, combustion, plant growth, and explosions share the same grid. It is not a prerecorded sand loop. Every occupied cell stores a material, visual variation, movement state, lifetime, and temperature. The simulation repeatedly transfers heat, updates material reactions, moves cells according to their behavior, and renders the result with a high-resolution structural layer, glow, scanlines, and a subtle vignette.
The opening scene is already an experiment. It contains a stone water tank with ice, a seed near the water, wooden and metal structures, plants, a sand pile, a fuse, and a pocket of explosive powder. You can let it run, alter one part, or press Clear and construct a blank laboratory. The active material displays a short behavior note, and its animated swatch gives a visual clue before it is drawn.
Every element in the rack
The element rack contains fifteen reactive materials plus Erase. Each entry has its own shortcut and behavior; choosing a new color does not merely repaint the same particle.
- Sand (1) is a falling powder that accelerates as open cells appear below it, settles into slopes, and can displace lighter fluids. Sand heated beside lava can bake into rigid glass, making it useful for observing a material transformation rather than only piling grains.
- Water (2) falls, spreads sideways to seek a level surface, moves below oil, extinguishes nearby fire, and boils into steam at high temperature. Contact with lava converts the lava to stone while the water becomes steam, producing both a material change and a hiss response.
- Oil (3) is a slower liquid that remains above water because water can sink through it. Radiant heat, direct fire, or neighboring lava can ignite it. A thin oil trail therefore acts as both a fluid experiment and a route for spreading flame.
- Lava (4) is dense, slow, and permanently hot. It creeps instead of flowing as freely as water, transfers heat to neighboring cells, ignites combustible matter, triggers powder, and cools into stone when it meets water.
- Acid (5) flows like a liquid and gradually consumes sand, wood, plants, oil, powder, ice, seeds, and fuse. It can also corrode metal more slowly. Stone and glass resist it, so they are the dependable choices for an acid container.
- Plant (6) is fixed organic material that spreads into neighboring water cells as it absorbs moisture. It burns when sufficiently heated, allowing a garden to become fuel if fire, lava, or a hot conductor reaches it.
- Stone (7) is a stationary, acid-resistant construction material. It can form floors, tanks, walls, ramps, and blast barriers. Strong explosions may chip occasional stone cells and transfer substantial heat, so a barrier can survive without being completely invulnerable.
- Wood (8) is a fixed structural material with low heat conductivity. It supports containers and seed experiments, but prolonged heat can ignite it. Wood produced by a growing seed behaves like drawn wood and can branch into plant tips.
- Fire (9) rises through empty space, heats adjacent cells, ignites flammable materials, and has a limited lifetime. It can become smoke as it dies. Water changes a flame into steam or smoke, while a flame beside powder may trigger an explosion.
- Powder (0) is a falling explosive material. Fire, lava, or enough accumulated heat detonates it. The blast heats nearby cells, turns many cells into fire or smoke, shakes the play area, damages some glass and structures, and can ignite another powder pocket for a chain reaction.
- Glass (G) is rigid, dark, and resistant to acid. It conducts heat better than wood and can be created by baking sand near lava. Glass is useful for transparent-looking channels and thermal containers, although a close explosion can break much of it.
- Ice (I) is a cold solid that can freeze adjacent water while its temperature remains low. Heat melts it back into water, and very high heat can convert it into steam. This supports repeatable freeze, melt, boil, and condensation-style experiments.
- Metal (T) is a bright fixed solid and the fastest heat conductor in the rack. It does not burn, but acid can corrode it slowly and an intense blast can remove a small portion. A metal strip can carry heat from lava or fire toward a distant fuel source.
- Fuse (F) is a stationary combustible line intended to transmit ignition. Heat, fire, or lava lights it, after which the flame can travel toward powder, oil, wood, or another fuse. Use it when an explosion should begin at a deliberate distance from the trigger.
- Seed (V) falls like a small powder until it rests on solid ground. If water is adjacent, it can become a living wood tip, grow upward, branch, and place plant cells. Excess heat destroys a seed as smoke, so successful growth requires ground, moisture, room, and protection from fire.
- Erase (E) removes cells beneath the selected brush or shape. Erasing a portion of a high-resolution solid line also invalidates its smooth overlay so the visual structure continues to match the underlying simulation.
Heat is shared across the whole scene
Sandlera runs a separate heat pass before material movement. Fire and lava continually add heat; ice continually cools; empty space loses heat quickly; and occupied cells cool more gradually. Neighboring cells exchange energy according to their conductivity. Metal carries heat quickly, glass and ice conduct strongly, water and stone sit in the middle, and wood or plants insulate more effectively.
This system connects reactions that are not touching the original flame. A metal bar can carry enough heat to ignite oil or fuse at its far end. Water can boil after sitting near a hot barrier. Ice can delay a reaction by absorbing heat, then melt and change the fluid layout. Temperature is not shown as a separate numerical graph, but its consequences remain visible through phase changes, ignition, steam, smoke, and material conversion.
Brush, Line, Rectangle, and Mirror drawing
Brush paints continuously while the pointer moves. The radius slider ranges from 0.5 to 8 grid cells in half-step increments. Small sizes are suitable for fuses, metal conductors, and precise repairs; large sizes pour fluids or build broad structures quickly. The circular pointer ring shows the active diameter and adopts the selected material color.
Line previews a straight segment from the first press to the current pointer position and commits it on release. Fixed materials and plants receive a smooth high-resolution visual stroke while still occupying real cells in the automaton. If heat, acid, erasing, or an explosion destroys part of the structure, the overlay is invalidated so it cannot remain as a false unbreakable line.
Rectangle previews and fills the area between two corners. It is useful for tanks, blocks of ice, powder charges, oil reservoirs, and layered walls. Mirror can be combined with Brush, Line, or Rectangle. It reflects the action across the vertical center, enabling symmetrical funnels, paired towers, mirrored fuse paths, and balanced reaction chambers.
Hold Alt and click an existing cell to pick that material from the scene. This is quicker than returning to the rack when repairing a structure. The active tool can also be changed with its displayed keyboard shortcut, while the left and right bracket keys decrease or increase brush size.
Undo, Clear, and a twenty-step editing history
Before a brush stroke, line, rectangle, clear action, imported scene, or memory load changes the grid, Sandlera stores an undo state. The history keeps up to twenty entries, including material cells, visual variation, remaining fire or gas life, falling velocity, line tags, and smooth structural lines. Undo restores the most recent state and clears accumulated temperature so the restored layout can begin reacting cleanly.
Clear also creates an undo point before emptying the complete grid. This makes Clear useful during experimentation rather than a dangerous irreversible reset. A brief white flash confirms that the scene was cleared. If there is no saved history, Undo reports that there is nothing to restore instead of silently doing nothing.
Three memory slots and portable JSON scenes
S1, S2, and S3 are browser-local memory slots. Click a slot to save the current material grid; a dot marks a filled slot. Shift-click the same slot to load it. The slots use compact run-length encoding and local storage, so they remain on that browser without an account. Loading a slot first creates an undo point, making it possible to compare a saved setup with the current experiment and then return.
Export downloads a sandlera-scene.json file containing the app identifier, format version, grid dimensions, and compressed material layout. Import opens a local JSON file and validates that it contains scene data before replacing the grid. JSON is the better choice when a scene needs to move to another device or be archived outside browser storage. Memory slots are faster for three ongoing experiments on the same device.
PNG snapshots and canvas-only video recording
Snapshot creates a 960-by-600 PNG from the play area. It combines the simulation cells, high-resolution structural lines, blurred glow, and current visual composition without including the element rack, buttons, article, or surrounding page. This produces a clean record of a finished reaction chamber or a visually interesting moment during an explosion.
The recording button creates a separate 960-by-600 capture canvas and redraws only the simulation presentation into it. Scanlines and a soft vignette are composed into the result, while controls remain excluded. Sound is enabled during recording and mixed from the Web Audio output into the media stream. The recorder prefers MP4 with H.264 and AAC when the browser supports it; otherwise it uses a compatible WebM and Opus fallback with the correct file extension. Press the same record button again to stop and download the finished file automatically.
Reactive sound without background music
The sound button controls procedural effects rather than a music track. Painting produces a short filtered brush sound. Moving powder can create a light patter, active fire produces occasional crackles, water meeting lava creates a hiss, and powder explosions produce a deeper noise-and-oscillator boom. A dynamics compressor controls sharp peaks when several reactions occur close together.
Sound starts enabled by default and the speaker button stores later mute or unmute choices locally. Recording keeps sound enabled so the exported video is not unexpectedly mute. If the browser does not provide Web Audio or media recording, the tool reports the limitation instead of pretending that an audio track was captured.
Collapse the rack, enter fullscreen, and use keyboard controls
The arrow beside the element rack collapses the complete options column and expands the simulation area. The canvas refits itself after the transition. The fullscreen icon beside the speaker expands Sandlera itself across the display and changes its accessible label to Exit fullscreen until the normal page view is restored. On narrower screens the stage moves above the rack, element buttons flow into additional columns, and the fixed collapse arrow is removed because the controls are already arranged vertically.
Material shortcuts are 1–9 for Sand through Fire, 0 for Powder, G for Glass, I for Ice, T for Metal, F for Fuse, V for Seed, and E for Erase. Editing shortcuts are B for Brush, L for Line, R for Rectangle, M for Mirror, Z for Undo, C for Clear, S for Snapshot, and [ or ] for brush size.
Experiments that demonstrate the simulation
Build a stone tank, add water, place ice along one wall, and heat the opposite wall through a metal strip. Draw a glass hourglass and compare how sand and water pass through the same opening. Float oil on water, ignite only one edge, and watch the flame follow the upper layer. Protect a powder chamber with stone, connect it to a fuse, and compare the blast with a glass enclosure. Place a seed on wood beside a small water supply, then introduce a distant heat source after the tree begins to branch.
The most useful scenes isolate one question at a time. A giant mixture can be entertaining, but a small chamber makes density, heat transfer, phase change, corrosion, or combustion easier to understand. Save the starting layout to a memory slot, change one material, and reload the original before the next comparison. Sandlera remains a stylized cellular automaton rather than an engineering calculator, but its rules are consistent enough to make each experiment readable and repeatable.
Sandlera also has a natural educational side, even when it is used only for fun. Its thermal automaton turns local rules into visible results: grains form slopes, fluids seek open space, heat travels through neighboring cells, phase changes create new materials, and a small ignition can become a chain reaction. Memory slots and JSON files make those experiments repeatable, while snapshots and recordings preserve the most interesting outcomes.