Skip to content
Built on the Blobscape engine

Published

Wading Pond

Wade the elf through a shallow pond in a ruin by candlelight. Every ring on the water comes from a foot going in or a leg pushing through, and it spreads, bounces off the banks and dies away on its own.

Starting the splat engine…

0 blobs, 0 m waded, the water is still.
Rain

A click or tap on the water lets one drop fall there; Enter on the view drops one in front of the elf.

How the water works

Nothing draws the rings

The pond is a grid of small cells, each holding how high the water stands there and how fast it is rising. Sixty times a second every cell is pulled toward the level of its four neighbors. That one rule is the wave equation, and it is all a ring needs to travel outward at a steady speed. A cell of dry ground gives its neighbor's push straight back, so rings bounce off the banks, the steps and the broken column.

The elf never asks for a ripple. Each frame the page finds where each shin and foot crosses the surface and tells the water. A leg standing on the bed takes the place of a column of water as wide as itself and as deep as the pond, so that much water is pushed to the cells round it; where a leg has left, the water comes back. A foot coming down raises a ring, a leg dragged through pushes a small wave ahead of it, and standing still lets the pond go flat. Rain and a tap on the water are drops added the same way.

Where the water lies is worked out too. The ruin is a scene written as shapes, like the ones in Diorama, and the pond floods outward from the elf through every cell whose ground is under the surface. The elf's feet stand on that same ground, stones and all.

The surface is drawn as flat blobs, two to a cell, each lifted and tilted to the water under it. Its color comes from where you look from: clear and green looking down into it, darker and more of a mirror at a low angle.

What it mirrors is the scene itself. Each time the mirror is drawn, the whole ruin, the elf and the flames are drawn once more as their mirror image, from where you are looking, leaving out whatever is under the water. Each blob of the surface then looks up what lies along its own mirrored line of sight in that picture. A ripple tips that line, so reflections wobble and break up as rings pass, and nothing in it is placed by hand: move the elf in front of the candles and their reflection goes dark behind it. Where the picture is empty the water mirrors the night sky, lighter toward the horizon. Because the mirror costs a second sort of every blob, it starts switched off where the browser has no WebGPU.

The view is finished through a lens, and that is worked out as well. The glow is the picture's own light: whatever is brighter than a set level spills some of that light round itself, so the flames and their reflections glow and the pale stone does not. The blur is a camera's: the lens is kept focused on the elf, and every other point is drawn as wide as a real lens of that opening would draw something at its distance, read from a map of how far away each pixel is. A wider opening (a smaller f-number) leaves a thinner slice sharp. The pond is photographed the way a model of it on a table would be, a twentieth of its size: a camera in front of the real place would keep all of it sharp, so from far off the blur is slight, and close in it is strong.

Each candle flame is a few dozen blobs on a bone that stretches and leans on its own rhythm. Their light is two of the engine's live lights, placed among the flames and as bright as they burn, casting shadows through a grid of what blocks light that is rebuilt every frame. So the elf throws a shadow on the wall as it wades past. All of it runs on Blobscape's own splat engine, here on WebGPU or WebGL 2.