Jump to content




[CC1.64+] Wool Image Printer

turtle

6 replies to this topic

#1 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 20 June 2017 - 03:31 PM

pastebin get c3wpz9LA wiprint

Posted Image
I spent over an hour looking for the original art source but I can't find it


So um yeah, give a turtle some wool blocks and an image, and it'll build it.

wiprint <imageName>

Works on NFPs (from paint) or GIFs. Can also build using clay or glass, if you like. You'll be advised of the block requirements before it begins, and the turtle will return to the start point whenever it runs out of a given colour (or if it runs low on fuel). Construction starts from the lower left corner of the image, and the result should be viewed from the turtle's right side.

If the turtle gets interrupted for whatever reason (eg its chunk unloaded), you can just re-run the script and it'll offer to resume. If it doesn't have a modem or you don't have a GPS set up, you'll need to first place it back at the starting point before setting it off again - I recommend you stick a block of wood or something under that location so's you can be sure to find it later.

When movement is obstructed, the turtle will simply wait patiently for manual clearance. When block placement is obstructed, it'll skip that position and move on.

If you want to build a GIF, then I recommend rendering it to a monitor first so that you've got some idea as to how the colours will convert. This basic script simply renders whatever image to the first found monitor:

pastebin get EPegdExd drawgif

drawgif <someGif>

Version History


#2 Exerro

  • Members
  • 801 posts

Posted 21 June 2017 - 06:45 PM

Neat. Why not get it working with more block types? I'm mainly thinking of hardened clay (and concrete for when CC updates), but even stone would be decent as it's fairly evenly coloured, like a few other blocks. Maybe add an option to limit the blocks it uses too, like --blockset-wool or something?

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 23 June 2017 - 01:32 PM

It'll already accept clay / glass as an alternative to wool, though it'd be simple enough to get it to differentiate between the different materials for greater colour depth (assuming not too many textures have changed since 1.7.10, when I mapped out the hues). But then previewing the results becomes trickier - a ComputerCraft monitor would no longer cut the mustard.

I suppose that's my cue to update skyTerm. That plus a throw-away creative world would make it pretty easy to test things out.

#4 MineRobber___T

  • Members
  • 50 posts
  • LocationStop being nosy

Posted 05 July 2017 - 01:46 AM

When I gave my turtle an image ( http://i.imgur.com/p1Y3HyT.png ) and told it to run, it gave me block totals. I gave it the required blocks, typed "y" at the Proceed prompt, and pressed Enter.

The turtle then just sat there. It didn't move, nothing appeared on the screen.

What have I done wrong? Using latest snapshot of CC.

#5 Anavrins

  • Members
  • 775 posts

Posted 05 July 2017 - 02:23 AM

Never forget to fuel your turtles beforehand.

#6 MineRobber___T

  • Members
  • 50 posts
  • LocationStop being nosy

Posted 05 July 2017 - 02:30 AM

View PostAnavrins, on 05 July 2017 - 02:23 AM, said:

Never forget to fuel your turtles beforehand.
I turned fuel off (so it doesn't need fuel)

#7 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 05 July 2017 - 11:43 AM

If the turtle sits stationary without erroring, then either its path is blocked (are there blocks in front of the turtle...?), it's in a protected area (are you trying to get a turtle to move around spawn...?), or it's indeed out of fuel (have you double checked your config...?).

In any case, if you simply enter the Lua console and enter turtle.forward(), you'll very likely be advised as to the problem.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users