Showcase [Showcase] 2D Printer

ManaUser

Brain of Cthulhu
2D Printer Mini.png
This is something I've been wanting to make for a long time, well before the mechanical update, but only with logic gates did it become feasible. Even an 8x8 version would have been huge using hoiktronics (of which I was never a big fan anyway) but thanks to the update I went ahead and made it 16x16. So what's a 2D printer? Well it's like a 3D printer, except Terraria isn't 3D. It's almost completely useless mind you. Although, I could imagine something like this being an interesting addition to an adventure map.

It's entirely hand made (built in-game, no tEdit) so it's not as complex as it might have been. I've held onto it for a while, toying with the idea of adding some other features, like the ability to store extra patterns, but ultimately I decided it's about at the limit of what's practical to build in-game. Perhaps I'll come back later and to a more advanced version using tEdit at some point.

Full Images:
2D Printer NW.png
2D Printer WW.png

Finally, since it's more fun to experience than just look at, I'm going to include the world file. This is the regular world I've been playing in. I deleted my base from it, because including that just felt a bit odd somehow, but it does include a few other mechanical creations, notably a world load detector (which actually controls the liquid generator for the 2D printer), Scrolling Text demo, and even the Bathysphere of Doom. The 2D Printer can be found a short walk west from the spawn point. Signs inside the machine explain how to use it.
 

Attachments

  • 2D Printer.zip
    994.3 KB · Views: 444
This looks cool! What's the science behind it? Lava and water falling together I see... But.. how does the timing work? Or.. Well, I'm impressed, I'm curious how it works in detail
 
Well, you can always download the map and see it in action. But basically it combines this obsidian generator, one of the first things I ever made, with cyclic memory. It always drops a full row of water, but only drops lava in the places indicated by the logic gates. The liquids drop simultaneously, with the lava being higher up (and slower moving) so won't collide before they land. Then the cyclic memory shifts over and it's ready to do the next row. Each row takes 7 seconds, for a total running time of about two minutes.

The selective lava dropping probably deserves an explanation too, because it took me a while to figure out a good way to do it. There's 2 rows of blocks with actuators, the top row being off (background) and the bottom on (foreground). And then...
1. The top row fills with lava from the sides.
2. For each column where lava should drop, the block in the top row is toggled. (Blocks are on where lava should drop.)
3. Then all actuators are toggled. (Bottom row is all off, top row is off only where lava should drop.)
4. Naturally, lava falls through at this point.
5. All blocks are toggled once more.
6. #2 is performed again, returning it to the initial state.
 
Last edited:
Well, you can always download the map and see it in action. But basically it combines this obsidian generator, one of the first things I ever made, with cyclic memory. It always drops a full row of water, but only drops lava in the places indicated by the logic gates. The liquids drop simultaneously, with the lava being higher up (and slower moving) so there's no danger of them hitting before they land. Then the cyclic memory shifts over and it's ready to do the next row. Each row takes 7 seconds, for a total running time of about two minutes.

Edit: The selective lava dropping probably deserves an explanation too, because it took me a while to figure a good way to do it. There's 2 rows of blocks with actuators, the top row being off (background) and the bottom on (foreground). And then...
1. The top row fills with lava from the sides.
2. For each column where lava should drop, the block in the top row is toggled. (Blocks are on where lava should drop.)
3. Then all actuators are toggled. (Bottom row is all off, top row is off only where lava should drop.)
4. Naturally, lava falls through at this point.
5. All blocks are toggled once more.
6. #2 is performed again, returning it to the initial state.
This is really inventive! I love how you did this!
 
This is really great but I thought you should know that I tried it and it didn't work the first time I tried it. It seemed like there was lag or a frameskip issue because the lava didn't fall all at once it kind of varied as it fell. It end up making a mostly solid obsidian block from where it messed up. (I think the fourth row up.) After it finished I cleared the area and tried it again and it worked (and was quite amazing).
 
Yes, I'm afraid it does have occasional glitches. One thing I've noticed to cause it is Alt+Tabbing out of the game while its running. (You didn't by any chance, did you?) Other than that, it seems fairly reliable, but liquids have always been slightly unpredictable, so I guess stuff can happen. Obviously I'd be interested in figuring out exactly what goes wrong so I could minimize the chances, but so far I haven't pinpointed anything.
 
No I didn't alt+tab out, but my computer isn't exactly a gaming pc so it was probably just an issue on my end. Maybe if you make the delay between each row slightly longer it would work with slower computers like mine (assuming that was the actual issue).
 
I had a similar idea some patches/years ago. If I remember right, I did it with birds and pressure plates (at the location you want to print) . So to setup a new printing output wasn't that easy as your design. My usage idea behind was to automate NPC flat building. So e.g. you print 3 flats in a row and the same design at the top of them. At the end you have a building with 7 times 3 flats = 21 flats with one printing design (of 3 falts in a row).

I also had some problems with different liquid falling speed. If I remember right the liquid also split up sometimes at impact. So I stoped worling on. I think its not possible to guarantee 100% success.

I did a test with you map:

test.jpg

my lava falling speed seem to be far to slow. Does it have the same as water at your PC?
 
Last edited:
my lava falling speed seem to be far to slow. Does it have the same as water at your PC?
Sorry, I didn't see this earlier. But no, lava definitely falls slower than water for me. The design is intended to account for this, but if it turns out it falls at different speeds on different computers that's a really bad problem for trying to build anything like this. Did you try clearing out the obsidian and giving it another shot? If it consistently fails, something is definitely wrong. On my computer it seems reasonably reliable, although not perfect.
 
I just tried using this again and found it no longer works. I donno if that last update changed how liquid flows more than just visually or what, but the lava wasn't reaching the bottom properly. I was able to get it working again by replacing the 3-second timers with 5-second timers. Obviously this makes it slower, but it gives liquid more time to settle so it should improve reliability.

So for anyone who tried this and had it fail, you might want to give that fix a shot. (Make sure you also clean out an obsidian stuck in weird places from failed runs.) If that works, you could try changing the left timer back to 3-second to speed it up again some. That version still works for me, but I suspect there's some variation between computers.
 

Attachments

  • Capture 2018-02-13 13_53_15.png
    Capture 2018-02-13 13_53_15.png
    92.3 KB · Views: 135
  • Capture 2018-02-13 13_53_45.png
    Capture 2018-02-13 13_53_45.png
    92.2 KB · Views: 132
  • 2D Printer Re-build.wld
    75.8 KB · Views: 225
Well, I guess I will have to test this out then.
I too had a crazy idea for a custom map that just wasn't possible until the wiring update.
`:)
 
Take a photo which you printed in game, please. Then you send me it. Thanks.
Capture 2018-02-13 17_07_20.png

[doublepost=1518543516,1518538416][/doublepost]I try print cube 16x16. It doesn't work correct. I repaired it.
Last version of map prepare for printing: 2D Printer Re-build.wld
 

Attachments

  • 2D Printer Re-build.wld
    76.5 KB · Views: 208
Yeah, it's didn't turn out too good for me. 'o_O
Capture 2018-02-13 10_08_39.png

Are the lamps on the AND gates below the switches meant to switch ON/OFF when you flip the yellow lever? I would have thought they would all go off after you flip the yellow lever and be ready for the next line. Should I just flip the ON ones I don't want ON to OFF and the OFF ones I do want ON to ON?
 
Sorry, I forget swich off all lamps. When you choose one line, you can swich lamps on/off.
Setting: 0000 = the first line
0001 = the second line
0010 = 3. line
etc...
1111 = 16. line
When you want to printe, you must set 0000.
Adding new picture:
for example: lamps [0001010001000101] 1. step: You must swich off all lamps in every lines which swich on. [0000000000000000]
2. step: You can switch lamps on/off.
3. step: set 0000
4. step: You can print.
I will try to do it easier.
 
Yeah, I thought that might be the case.

Edit: Well it came a lot closer this time.
Capture 2018-02-13 19_54_36.png

It seems like it missed a row.

Also you should really make a digital number display going from 1-16 or make the signs say start on line 0 instead of the first line, because 0000 = 0 and 1111 = 15. It's kind of confusing calling 0000 the first line when it's 0 in binary. `:confused:
 
Last edited:
Back
Top Bottom