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

Drawing Monochrome Graphics.

Started by martin509, 30 December 2013 - 09:18 PM
martin509 #1
Posted 30 December 2013 - 10:18 PM
After a very long hiatus, I have decided to return to toying around with ComputerCraft programs. I want to modify the game 'tunnel' to use filled in white pixels on a normal (non-colour) computer. I know that it's possible (the stock worm program does it), but I can't figure out how to get paintutils to do it.
Sorry if this is a painfully stupid question.
MudkipTheEpic #2
Posted 30 December 2013 - 11:53 PM
If you want to make a filled in white pixel, then simply write a space while the background color is white. To do this, use this snippet:


term.setBackgroundColor(colors.white) --#Set the color to white
term.write(" ") --#Write a space
term.setBackgroundColor(colors.black) --#Assuming the background color of the game is black. 

To check if the computer is color (advanced) or not, use term.isColor(). It returns true if the computer is color, and false if it isn't.
Edited on 30 December 2013 - 10:56 PM
CometWolf #3
Posted 31 December 2013 - 06:54 AM
to do it with paintutils you simply do paintutils.drawPixel(pointX,pointZ,colors.white). If you want lines you can do paintutils.drawLine aswell, jsut give it 2 sets of coordinates.