This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
newcat's profile picture

CC-Drawer v2.0a - Let your turtle build pixel art

Started by newcat, 08 May 2012 - 04:53 PM
newcat #1
Posted 08 May 2012 - 06:53 PM
CC DRAWER 2.0a: A pixel-art program which builds your pictures in minecraft
Today I am publishing the alpha version of my CC-Drawer program. This program is capable of building every picture with (currently) a maximum size of 250x250px. Sounds small. But it isn't. Features:
  • Convert any picture with a maximum size of 250x250 pixel into a minecraft pixel-art picture (every common file format supported)
  • Full color support
  • Alpha channel
  • Advanced pathfinding
  • Soon multiple turtles will be supported
  • Fast convert times and pathfinding
  • Multithreading support soon
This version won't be just an update for the old CC-Drawer. Instead it is a complete rewrite which improves almost everything. Changelog from version 1.0:
Spoiler
  • All 16 minecraft wool colors are now supported
  • Pathfinding
  • Alpha channel
  • New converter with almost no conversion time


–Coming soon: Indepth explenation of the algorithms used | Tutorial how to use this –


DOWNLOAD: http://newcat.bplaced.net/CCDC.zip Note that this is still in an early version, so please post any bugs you find in this thread.


INSTALLATION:
Converter:
Unpack the zip-file and run the setup file. It's as simple as that.

Turtle Program:
Copy the file "ccdrawer" contained in the zip-file into the folder of your turtle.
The folder is located in {\path\to\your\minecraft\}saves\{worldname}\computer\{computerID}
You can get the computerID of the turtle by going into the lua console and then typing in "os.getComputerID()"

HOW TO USE THE PROGRAM:

Converting a picture:

  • Open the program
  • Load a picture by clicking the "Open Image" button (the maximum size of the picture is 250x250)
  • If another window overlaps the converter window and the picture disappears then press the little "R" button
  • Click the "Convert" button
  • Select the alpha color
  • If everything is fine then click the "Save CCD Image" button and save the image into the turtle folder where your CCD program is
Building the converted picture:
  • Move the turtle to one block above ground
  • The starting point of the turtle will be the upper left corner of the picture facing up like this (T = turtle, P = Picture, | = where the turtle is facing)
|
T P P P P
P P P P P
P P P P P
  • Place wool in the turtle's inventory like this:
  • Run "ccdrawer"
  • Type in the filename of your picture
  • When the turtle stops moving and hasn't finished building yet then it is probably out of wool. Look at the console, it says which wool type it is missing
  • Have fun! (most important ;)/>/> )
Please post any bugs you experience!!

TODO:
  • Add support for multiple turtles
  • Remove the "Open CC Image" button since it just makes no sense
  • Improve color recognition in the convert process
Old post:
SpoilerHello everybody since I've programming with turtles, I had the wish to program a turtle to draw a picture in Minecraft (pixel-art). Now this came out: http://pastebin.com/4xSYK73B This is a program which is able to draw converted pictures in Minecraft (pixel-art). It is very easy to use and faster than doing it "with hand". Images (NOTE: These pictures aren't very good, i shot them in the beta-phase, better pictures will come soon!):
Spoiler
Installation:
SpoilerDownload the CC-Drawer Program: http://newcat.bplaced.net/CCD/drawer (maybe Right-Click -> Save target as…) Download the CC-Drawer Converter: http://newcat.bplace...CDConverter.zip Open the Minecraft-World (I recommend a superflat world) in which you want your picture to be builded (e. g. Pictureworld). Place a turtle, access it and type in "lua". Then type in "os.computerID()" and remember the number. Now open the .minecraft-Folder, go into the saves-Folder and then in the world with the turtle (in my case Pictureworld). Then go into the "computers"-Folder. There must be a folder with the number (ID) of the turtle. Open this folder and paste in the drawer-Program. Now you can extract the converter anywhere on your PC, for expample in your Pictures-Folder. IMPORTANT: Do NOT delete any of the files which come with the converter. When you do it anyway, the converter WILL NOT WORK!!!
How to draw a picture in Minecraft:
SpoilerAt first you need a bitmap with dimensions about 20x20 pixel (Note: 1px = 1 Block in Minecraft. 2s/block * 400 blocks = 800s /60 = ~13min | The picture can be bigger or smaller, but a 100x100 picture will take about 5 hours!) Run the ccdc.exe. Then click the Open Button, select the bitmap, click Convert, select a place and a name without an extension and wait until the conversion is completed. (Note: Maybe the program seems "freezed" while converting. Don't mind - you get a message when the conversion is finished.) Now copy the picture to your drawer program. Then open Minecraft, go into the world where the turtle with the drawerprogram is. Right-Click the turtle. Fill the slots of the turtle exactly like in this picture: Then type in "drawer" and then the name of the picture. That's all! Happy Drawing!
Changelog:
SpoilerV1.0: + Initial Release Todo: - Adding a brown color - Making a progress bar for converting - Optimize turtle program (for faster building)
I would be happy if you post the Pictures you made with my program here in the thread!
Edited on 07 September 2014 - 01:39 PM
dan200 #2
Posted 10 May 2012 - 11:25 AM
Hey! I just want to say this is awesome!
newcat #3
Posted 21 March 2013 - 03:21 AM
Hello everybody,

now it is almost one year since the first version of this program came out. At the moment i'm coding hard to get version 1.1 out. Already implemented are:

+ Added a progressbar while converting
+ Added a brown color
* Fixed some errors when opening wrong types of picture

Planned:

+ Adding a brown color
+ Adding support for multiple turrets so not only one turret can build a picture
+ Adding an update reminder

Estimated Release Date is the 13th April 2013.

It would be nice if you give me feedback what I can improve at the programs.

newcat
newcat #4
Posted 27 June 2014 - 02:31 PM
HUGE UPDATE COMING!

Features in the new update:
  • All minecraft wool colors will be supported
  • At the moment I am completely rewriting the converter to support these awesome new features:
    • Every common picture file format will be supported, not just *.bmp
    • Converting is now almost instantly done, even with large pictures (max. size atm limited to 250x250, just for the reason even such a "small" picture would take 34h to build if no alpha color is selected and just one turtle is used. Also I will probably use an 8-bit file format in the future, which also would just support 255x255 pictures, so no big deal there)
    • It is possible to choose a block color as alpha channel. So if you have a white background, you can select "white" as alpha color and save tons of white wool and time
    • Due to the alpha color implementation a new pathfinding is needed, to make building more efficient. This is one of my biggest problems at the moment, since I have never done something like that. If someone has a clue how to do that (I was thinking about a Nearest-Neighbour-algorithm), please post that
    • There is a table to view all the stats about your picture (e. g. how many blue wool blocks you need and how long it'll take to build)
    • In one of the future versions I will add an option to scale your picture down to smaller dimensions so it doesnt take too long to build and you dont need to downsize it with another program
  • I'm planning to support multiple turtles building at once in one of the future versions
This is basically it, I hope you can give me some feedback on what features you want and what I can improve.

Oh and btw: I removed the old spotlight/tutorial video, because it was just emberassing ;)/>
Edited on 07 September 2014 - 01:37 PM
newcat #5
Posted 09 July 2014 - 10:54 PM
@Admins
Can someone try to fix my OP? Because i just edited and saved it and now it is completely destroyed… And to be honest I dont want to rewrite the complete post..


Fixed it!
Edited on 10 July 2014 - 10:37 AM