← all demos · chapter 06

Trails — the don't-clear-the-canvas trick

Normally you wipe the canvas every frame. Instead, paint a translucent rectangle over the old frame: everything that moves leaves a fading smear, automatically. Three lines, a whole aesthetic.

The trail length is just how slowly the old frames get painted over. Fast fade reads as speed; slow fade reads as haunting.

Try tweaking: fade 0.08 → 0.5 (crisp comet) → 0.015 (long ghosts) · the two frequencies 1.1 / 2.2 → 1.0 / 1.618 — an alien pair that never quite repeats · dot count: add a third.

In Godot: a trail is short-term memory, drawn — remember the last N positions, redraw them with fading alpha (download trails.gd); the structured version is Line2D fed those same positions (fading width/alpha along its length). In Unity: the TrailRenderer component — add it to anything that moves, zero code, then shape its Width curve. In Unreal: a Niagara ribbon emitter. Chapter 06.