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

[1.3] Printer

Started by ComputerCraftFan11, 20 April 2012 - 12:43 AM
ComputerCraftFan11 #1
Posted 20 April 2012 - 02:43 AM
This may have been suggested before but computercraft needs a printer peripheral.

You put it by a PC, and insert a map as paper.

On the PC, you can do:

printer = peripheral.wrap("left")

drawing = printer.draw()

for i=1,printer.getSizeX() do
  drawing.newDot(i,1)
end

This will make a dot on the top going across the map

More advanced:


term.clear()
term.setCursorPos(1,1)
print("xXm0d'zXx Printer \n")
write("Choose a side: ")
input = read()
printer = peripheral.wrap(input)

if(printer.hasMap)then
  drawing = printer.draw()

  for i=1,printer.getSizeX() do
	drawing.newDot(i,1)
  end

  printer.eject()
  print("Ejected!")
else
  print("Please insert paper first")
end
Hawk777 #2
Posted 20 April 2012 - 07:00 AM
I like this idea! It's like all the graphics suggestions, except it's practical because the amount of data transferred is fairly small (one image per printout rather than continuous images updating on a screen).
Xfel #3
Posted 20 April 2012 - 09:07 AM
It's a good idea and could be fairly nice. I took a look into the map source code, and I think it would be possible. The problem is that a map gets updated when the player moves through. So whatever the player printed upon it would be overridden when a player moves through the target area. A solution would be to set the map center to somewhere far outside the world area.
Teraminer #4
Posted 20 April 2012 - 10:03 AM
IF Jeb makes you able to write in books then you could put the book (lol) in the printer.
Dirkus7 #5
Posted 20 April 2012 - 03:15 PM
Maybe not printing on a map, but a new item which looks exactly like the map, but it can only be used by the printer, so you don't get that problem
Wolvan #6
Posted 20 April 2012 - 03:41 PM
Aren't there people out there that draw one text on maps or something like that? I saw that when I played the Deep Space Turtle Chase Map
ComputerCraftFan11 #7
Posted 21 April 2012 - 04:08 AM
Aren't there people out there that draw one text on maps or something like that? I saw that when I played the Deep Space Turtle Chase Map

Yea, they make the letters giant somewhere else and craft a map over there
ComputerCraftFan11 #8
Posted 21 April 2012 - 06:33 AM
Maybe not printing on a map, but a new item which looks exactly like the map, but it can only be used by the printer, so you don't get that problem

And add the ability to label the map(the text in the corner of the map)
Xtansia #9
Posted 21 April 2012 - 07:03 AM
The way they put images on a map is they edit a maps nbt info,
Each pixels color is stored in an array which is written to nbt with the item,
So they just rewrite this array with the colors they want,
You are limited to 128 * 128 pixels, and 16 colors.
I am unsure if you can do this ingame but it is certainly possible outside of game,
There is a tool called Image to Map(I think) that allows the conversion of Bitmap images to a map ingame.
louisrocks40 #10
Posted 23 April 2012 - 11:03 PM
I love this idea! It would make smp a bit more interesting, as you can leave messages without using a map editor (which requires an nbt editor and the map file, which is something that players cannot get without using the server host's computer).
LipJ #11
Posted 23 April 2012 - 11:25 PM
This could allow for a turtle to explore a map then print it. Hope it happens.
ComputerCraftFan11 #12
Posted 24 April 2012 - 01:46 AM
This could allow for a turtle to explore a map then print it. Hope it happens.

Or a turtle can read a map and explore it
ComputerCraftFan11 #13
Posted 05 June 2012 - 04:45 AM
It seems like someone made a printer peripheral.

Check out that too (if you want a interactive version of what this would look like if it was added)