Skip to content
BACK TO TRANSMISSIONS

Devlog #30 - Fourfold: The Mathematics Does the Level Design

A new game, and the studio's first paid title. Fourfold is a deduction puzzle built on the Abelian sandpile model - 230 boards, each with a machine-proved unique shortest solution, on Android and the web.

#devlog#fourfold#announcement
Devlog #30 - Fourfold: The Mathematics Does the Level Design

Fourfold is a deduction puzzle where you cause avalanches on purpose. You are shown a picture. You have to produce it by dropping the fewest possible grains of sand.

Every cell holds up to three grains. Put a fourth in and the cell empties, pushing one grain into each of its four neighbours. That can set off the neighbours, and theirs, and theirs. Grains that reach the edge fall off and are gone.

That is the entire ruleset. Everything else in the game is a consequence of it.

Why we built it this way

Puzzle design is normally a QA problem. You author a level, you play it, someone finds a shortcut, you patch the level. "Par" is a designer's guess that survived playtesting. Fourfold does not work like that, because it is built on the Abelian sandpile model - Bak, Tang and Wiesenfeld in 1987 for the physics, Dhar in 1990 for the algebra - and four results from that literature do the work a designer would otherwise do by hand:

  • The order you play in never matters. Dhar's abelian property: the settled board is identical whichever unstable cell resolves first. So undo is exact and no board can be ruined by a bad tap.
  • Every target is reachable. Legal boards form a finite abelian group and single taps generate all of it. Solvability is a theorem, not a test pass.
  • The shortest solution is unique. Proved for every one of the 230 shipped boards, not sampled. More on that in the next devlog, because it is the interesting part.
  • There is exactly one strategy, and you can write it down. Your total taps equal the grains you need to gain plus the grains you waste off the edge. The first term is fixed by the board. So playing well is precisely wasting less sand. Avalanches in the middle are free. Avalanches at the boundary leak.

Every one of those is checked by the test suite on every build rather than asserted in a design document. The campaign regenerates and re-verifies in well under a second.

What's in it

Restore is the campaign - 230 boards across seven chapters. Square grids, grids with holes, hexagonal boards where a cell holds five and discharges on the sixth, and toroidal boards that wrap around a single drain.

Daily is one board a day, the same for everyone, generated on the device. The engine exists twice - once in TypeScript for the web, once in Kotlin for Android - and the test suite pins them to bit-identical output, so both platforms produce the same puzzle with nothing shipped and nothing fetched.

Cascade is endless. Drop grains on a critical pile and the avalanche sizes fall into a power law, because nobody tuned them to. That is what self-organised criticality does on its own.

Atelier lets you draw a board of any shape and reveals the identity element of its sandpile group, with the group's order. A 64×64 square resolves in about 175 milliseconds, computed by the same code that runs the game. There is no known closed formula for constructing one, so computing it is the only way to see it.

Journal is eight techniques, named after the real mathematics, unlocked by demonstrably using them rather than by reading about them.

No timers, no fail state, no energy

There is nothing here to lose and nothing to wait for. Grain height is shown by fill and by pip count, never by colour alone, with the pip colour chosen against each cell's own luminance so the count stays legible on every step of both ramps. Reduced motion is honoured from the system setting. Light and dark both ship at full quality - dark is the default because a cascade needs darkness to read as light moving across a surface.

The commercial part

This is Cathode Ray Games' first paid title. How each game is priced is decided per game and stated on its own page.

There is a free web demo, which installs as a PWA and works offline. It stays a demo: it is there so you can find out whether you like the game before paying for it. The full game is $3.99 on Android, once. No advertising. No in-app purchases. No subscription. Nothing to unlock.

And the part we care most about: the Android build does not request the INTERNET permission at all. Not "we promise not to track you" - the operating system prevents the app from opening a network connection. You can verify it in the permission list in four taps. That constraint is why there are no ads, and it is the reason the daily puzzle is generated on your phone rather than downloaded.

The demo is up now. Android lands 10 September 2026, and there is a waitlist on the game page.

The engine, the level generator and the uniqueness proofs are open source.

BROADCAST: X LINKEDIN REDDIT