Using automatic PIPE tracks

From The Powder Toy
Revision as of 08:16, 10 May 2016 by grammaticalrepairs (talk | contribs) (Enter a short summary [alt-shift-b])
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you haven't figured out how to use PIPE yet, go back and read the first tutorial! This entire section is largely assuming that you already know the basics of how to build pipes.

This page shows examples and explains more in-depth what happens when you build pipes that are 1px thick, and some tips and tricks.


Slow1pxPipe.gif

Basically, PIPE element was originally slowest when 1 pixel thick. This was essentially because PIPE particles individually check each of their eight neighboring spaces for PIPE with particles to absorb, randomly deciding which neighbors to check on every frame. As a result, a 1px thick PIPE ideally only gives particles one out of eight directions to go, and since it checks randomly, there's a very small chance on every frame that actual movement will occur.

...You might've noticed that thicker pipes don't have this issue since every pipe particle generally has eight directions to choose from, but since on most computers this lags quite a bit, it's not always good to fill a map with massive pipes.

So Cracker64 did some awesome stuff and added a special condition for when PIPE is generating its red/green/blue tracks, so that whenever a generating trail encounters only a single PIPE particle, any particles travelling through the pipe will always move in the direction that the pipe was generated in.

...And so you get this:

Fast1pxPipe.gif

As you probably already noticed towards the end of the animation, PIPE particles still absorb and emit particles at their open ends at the same speed as ordinary pipe, unfortunately.

...You can easily fix this however by making the ends of the pipe thicker than 1px. The length of the pipe will still generate automatic pathways regardless of the ends, though obviously the ends themselves will be ordinary pipe. This gives 1px thick pipe a significant advantage over most pipes less than 5px thick, since they don't clog up so long as the ends are wide enough or open to air in enough places.

PipeCornerProblemDemo.gif

A new way to fix this is to delete the last 2 pixels of the pipe at the end. It will then automatically push the particle into the empty space without any delay.

You can also put PRTI at the end now, and the PIPE will pass into it. This is the fastest way to get particles out of any kind of pipe.

Particles can pass to and from automatic pathways inside of pipes without limits, though you'll notice a slight pause in the speed of particles passing from one to the other, as if the particles were jumping from a pipe to empty space and back. As a result, you should always try to make sure that every joint in your 1px thick pipes is diagonal, rather than an even right angle. Looking at the bottom-right of the above animation, the particles don't get caught in the corners of the pipe that has no PIPE particles at the edges of every corner, causing particles to glide smoothly through the entire pipe.

PipeTracksDemo.gif

Also, auto-generated 1px thick pipes will ignore even other pipe particles while touching. This means you can build pathways of pipe -through- pipe without issue, and still come out through the other side of a block of PIPE particles, so long as you built the surrounding PIPE particles after you built the pathway of PIPE in 1px thick paths.

ThreadedPipeDemo.gif

Using this concept, you can even thread multiple 1px thick pipes together, with careful design and planning. It's -not- easy to do when you have to wriggle pipes around themselves, but then again it never was before.

Basically in this image:

1. Generate a single 1px thick pipe

2. Remove the Brick

3. Stamp the entire area/pipe

4. Create two 1px thick pipes while paused right beside of it and being careful to mind the pixel corners

5. Erase the original 1px thick pipe (which I stamped before)

6. Wait for the other two pipes to generate normally

7. Lastly, paste the original 1px thick pipe in between them.


With this kind of pipe, it's actually more efficient and essentially never clogs.

Lookie below, it's faster than the equivilent thickness of pipe.

FastPipeComparison.gif