Tips for golfing in The Powder Toy Have fun with this one, The Powder Toy is a interesting challenge for golf, especially with filt logic.

The thing that makes TPT a challenge is the many many many many ways to approach a problem: Should I use Cellular Automaton rules, SWCH logic, Filt logic, subframe filt logic, and/or wall logic?

As such, a location for tips for TPT golfing would be quite helpful, so I made this question thread. 

This thread will likely use a lot of abbreviations. A lot of them will be in-game elements, so searching them up on the Wiki will bring you a lot of information about them, like what they are.

Here are the most common ones you'll likely see in this thread, with their ingame description attached (and their full name), for people who don't want to go searching:


SPRK: Electricity. The basis of all electronics in TPT, travels along wires and other conductive elements.
FILT: Filter. Filter for photons, changes the color.
ARAY: Ray Emitter. Rays create points when they collide.
BTRY: Battery. Generates infinite electricity.
DRAY: Duplicator ray. Replicates a line of particles in front of it.
CRAY: Particle Ray Emitter. Creates a beam of particles set by its ctype, with a range set by tmp.
SWCH: Switch. Only conducts when switched on. (PSCN switches on, NSCN switches off)


List of all elements
Only use subframe logic when it's smaller

And, for more complex machines, it's often much smaller.

Subframe generally imposes the overhead of creating solid SPRK (about 3 pixels for most directions, an extra pixel compared to just a BTRY), FILT 'channels' (for fast BRAY transfer), and minimizing the amount of nonsubframe logic, even if it's smaller, due to it being many times (4x to 20x-30x slower!) slower.

Subframe logic is often good for complex operations (which is most of the challenges here), but for simpler ones, subframe logic is probably not optimal.