Skip to content

Releases

Langton v0.1.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 10:14

The first release of Langton: Langton's ant for Resolume Arena and Avenue, as two FFGL plugins. SW Langton (LA01) is a source in which one ant, or up to eight, walks an empty grid or a soup; SW Langton Over (LA02) is an effect in which the ants walk your clip, its brightness being the ground they read and repaint.

The one idea: an ant on a grid of black and white cells. On a white cell it turns right, on a black one left; it flips the colour of the cell and steps forward. That's the whole rule (Christopher Langton, 1986), and nothing in the plugin draws a picture of an ant's walk: the walk is the rule, run exactly, one step at a time. For about ten thousand steps it makes what looks like noise; then, at step 9977 from an empty grid, it starts building a highway, the same 104 steps over and over, each cycle carrying it two cells diagonally, for ever. Give the colours more letters and you get Greg Turk's and Jim Propp's ants: LLRR and RLLR grow symmetrically, LRRRRRLLR fills a square, and the rest of the Rule dropdown builds convoluted highways or stays chaotic. Every step can be undone, so Reverse runs the walk backwards exactly, and ten thousand steps of chaos un-happen into the empty grid they came from. In the Over, the clip is read once when the field is seeded, cut into as many levels as the rule has colours, and the ants repaint it as they go.

Controls: Rule (seven: Langton's RL, LLRR, RLLR, LRRRRRLLR, LLRRRLRLRLLR, RRLLLRLLLRRR, RLR), Ants (1–8, taking turns), Speed (a pause to a million rounds a second, a round being one step for each ant), Reverse, Step (one round by hand), Pattern (Empty or Soup; the Over adds Clip), Density, Seed, Reseed, Audio, Audio Burst (rounds per onset: the ants run on the beat), Audio Reverse (each onset turns time round), Cell Size, Gap, Palette (Phosphor, Heat, Ice, Mono, Spectrum), Trail and Show Ants; the Over adds Clip Colour, Backdrop and Mix.

Downloads: a universal macOS build (Apple silicon and Intel) as a .dmg or .zip, and a Windows x64 installer (-setup.exe) or .zip. Each carries both plugins: Langton.bundle and Langton Over.bundle on macOS, Langton.dll and Langton Over.dll on Windows. The macOS build is Developer ID-signed and notarised by the fleet's signing agent once the release is published. The Windows build isn't signed, so SmartScreen warns once.

What is measured (offline, by tools/verify.sh on an Apple Silicon Mac under macOS 26.4, driving the plugins' own classes in a headless GL context at 1280×720 and 320×180 and on Apple's software renderer):

  • The literature. On a 512×512 grid, the plugin's own walk: Langton's ant's turns repeat every 104 steps from step 9977 to 12,000, 19 whole cycles, each moving it (−2, −2); 720 black cells at step 10,000 and 834 at 11,000. LLRR and RLLR are mirror-symmetric at all 697 and 533 of their returns home in 20,000 steps (RL: 1 of 15). LRRRRRLLR's visited cells are a square, 95.6–100% filled, from 20,000 to 160,000 steps.
  • The engine. All seven rules × 1, 8 and 4 ants × 3000 rounds of a soup on a 157×93 torus: identical to the harness's own walk (written separately, with direction vectors) at 36 checkpoints, every cell's colour, visit and time of visit, and every ant.
  • The GPU's texture. Langton's ant to 12,000 steps through the plugin, 500 a frame: the state texture read back after every frame is the harness's walk, texel for texel.
  • Reverse. Every rule, a soup and four ants, out by the clock and back by the clock and by hand: every cell and ant back at the seed, and out again to where it was; Langton's ant 12,000 steps into the highway and back to an empty grid.
  • Clock, coverage, look. From a host clock at 499,000,000 ms every frame's dt is within 6×10⁻¹¹ s and the step count is floor(Speed × elapsed); each pixel is the painted area it covers to 1.9×10⁻⁴; every cell is its palette colour plus the trail's glow, and each ant its colour, to 7.5×10⁻⁶.
  • Over, resize, audio, GL state. The seed is the clip's brightness in the rule's levels, cell for cell, not mirrored, and Mix 0 returns the clip bit for bit; a resize of the same shape keeps the walk bit-identical; the first frame after a trigger fires no audio onset and the next beat does; both plugins hand back the GL state they were given.
  • The checks can fail. Fourteen deliberately wrong models each fail their check, and seven one-character mutants (three GLSL, four C++) are all caught. All 35 parameters over both plugins change the picture. The bundles are universal, and oxbow sees SW Langton / LA01 / source and SW Langton Over / LA02 / effect and renders 120 frames through each.

Windows, in Resolume Arena 7.27.1 (win-lab, Mesa llvmpipe: software rendering, no GPU, no sound device): the x64 build loads, registers and renders, both plugins, and passed every one of the fleet's Arena checks that can run there (15 passed, 2 skipped: audio). Every control is as declared (22, and 26 with Arena's Opacity) and Arena's log stays clean. The gate measures each control against a still picture, which a walking ant never quite is: in the source all 12 of the controls it could measure changed the picture; in the Over 15 did and Reverse was too close to call. The three audio controls can't be tested without a sound device. That run was on a build from just before two fixes found while writing the guide (below); a second run, on this release's own langton-windows-x86_64.zip, passed the same 15 checks with the same verdicts. Software rendering says nothing about a GPU or about speed.

Fixed before release. After a Rule change to one with fewer colours, cells left over from the longer rule now draw as the colour the ants read them as (colour modulo the rule), not as an empty palette slot, which drew them opaque black. And switching Audio Reverse off now hands time back to Reverse, where before an odd number of onsets could leave the ants walking backwards with Reverse unticked. Each has a harness check that fails on the old code, and a negative control of its own, which makes fourteen.

On macOS it's never been loaded into Resolume; the fleet's test host, oxbow, is the only host it's run in there.

What isn't verified, or is a limit. The grid is a torus, so Langton's highway runs off one edge, comes back on the other and, on the default 120-row grid, runs into its own chaos within a minute. Reverse is exact for the walk as it stands: a change of Rule, Ants, a Cell Size change that cuts cells off, or a reseed is not undone, and run back past the seed the ants walk on into a past that never happened, by the same exact rule. The Over reads the clip once, at the seed; after that the clip shows through only as Backdrop and Clip Colour. The walk is on the CPU, at most 100,000 rounds a frame, so a million rounds a second below 10 fps runs slower than Speed. The colours and palettes are chosen by eye. The audio controls have never heard real audio in a host.

Cost: median GPU frame times with glFinish both sides, on an Apple Silicon GPU shared with other work: SW Langton 0.19–0.29 ms and SW Langton Over 0.19–0.34 ms at 720p and 1080p, 0.35–0.79 ms at 4K, at the defaults. The walk is on the CPU, so the cost grows with Speed and Ants: a million rounds a second with eight ants on 1080 rows took 3.4–4.3 ms a frame when it was built and 3.8–6.6 ms in this release's runs on a busier machine. Nothing was timed inside Resolume.

Not done. No presets and no OpenFX port. The browser demo is a port of the walk to JavaScript, checked step for step against the plugin's C++, not the plugin itself, and it has no audio.