Subframe tools quick access
  • The Subframe Mod: GUI enhancements to help with subframe development.
  • SchemTools: Lua framework for code-based subframe engineering.

What's subframe? Subframe is an electronics design paradigm in The Powder Toy, a falling-sand game from back when falling-sand games were still a thing. It exploits the way that the game updates particles to create very fast electronics. Here are some things I made that use subframe:

SIMD16S
SIMD16S

Accelerator for bitmap operations running Conway's Game of Life.

DISP56S
DISP56S

Low-latency color screen for ~15Hz video.

26-Bit Divider
26-Bit Divider

Division circuit based on the radix-2 SRT division algorithm.

Subframe is often conflated with general Powder Toy electronics and computer-making, but, technically speaking, a creation is really only "subframe" if it exploits particle order in a way not explicitly supported by the base game. In terms of Minecraft analogies, subframe is more closely related to things like piston fast transport than to redstone computers.

Why subframe? Subframe is a niche field and is full of unsolved problems. Optimizing a circuit to be as small as possible is like code golf in a very esoteric language. The results are often satisfying and fun to play with. What's more, The Powder Toy is free and open source.

Interestingly, subframe engineering has many parallels with real-life digital logic design. While particles update sequentially, geometric constraints and FILT mechanics make it such that circuits have to be designed with parallelism in mind. For example, the best subframe adders to date are Kogge-Stone adders.

Why not subframe? Very few people still play The Powder Toy, so no one will know what you mean when you say "subframe". Its physics is in no way realistic: memory access is immediate (though this may change with PHOT-stack-based memory), incrementers are O(1), and noise is never a problem. After a certain point, you don't gain any transferrable skills.

How to subframe? As with other things in The Powder Toy, the best way to learn is through reverse-engineering and experimentation. You could also come visit us at the or #powder-subframe on Libera.Chat. Beyond that, here's some material to help you get started.

The Subframe Lessons
The Subframe Lessons

A series of lessons explaining the basics of subframe and digital logic, starting from the very basics.

Incrementer Tutorial
Incrementer Tutorial

A slightly outdated but advanced tutorial that walks you through creating a logarithmic incrementer.

The Subframe Handbook
The Subframe Handbook

A slightly outdated collection of common circuits that you could use or reverse-engineer.

Once you've figured out the basics, you'll probably want to download my mod or Maticzpl's Lua port to help with things like particle order reloading and stack manipulation. You'll also find it useful to learn how to automate particle placement and configuration with Lua. Lately, I've converted to using SchemTools to develop circuits entirely in Lua, which makes it easier to test, refactor and document designs.

What's left to do? There's certainly a lot to be done, even just in terms of making smaller and more powerful computer systems. There's also continued work on basic technologies like velocity adders and megastacks, as well as application-specific components for things like video games. I'm most excited about massively parallel graphics, an area that published designs have barely scratched the surface of.