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

NORAD map?

Started by crasher925, 09 June 2014 - 06:57 PM
crasher925 #1
Posted 09 June 2014 - 08:57 PM
so say i wanted to be a show off and make a map of the United states norad style on a large screen like so:



what would be involved in making such a "program"
flaghacker #2
Posted 09 June 2014 - 09:09 PM
It's going to look horrible with the resolution of computers in computercraft, but oh well…

A table with the coordinates of all the lines (hardcoded)
A for loop, looping trough that table and calling "paintutils.drawLine()"

Or

A image made in the in-game paint, and then "paintutils.drawImage" to draw it on the screen.

Look up those functions on the wiki for usage info.
crasher925 #3
Posted 09 June 2014 - 09:34 PM
really I thought that adv computers would have a higher res then regular computers i havent played minecraft in a long time so i could be wrong
Cranium #4
Posted 09 June 2014 - 09:49 PM
You can always reduce the text scale of the monitors, with monitor.setTextScale(scale) after wrapping it.
MKlegoman357 #5
Posted 09 June 2014 - 10:48 PM
And you can also use ASCII art to make lines.
crasher925 #6
Posted 10 June 2014 - 01:24 AM
oh ok im a bit of a noob so what would the coding look like?
KingofGamesYami #7
Posted 10 June 2014 - 03:24 AM
http://computercraft.info/wiki/Paintutils_(API)

local mon = peripheral.wrap( "side" ) --#replace side with whatever side it is on, eg. "right"
term.redirect( mon ) --#we want paint to render on the monitor
mon.setTextScale( 0.5 ) --#minimum setting for maximum resolution
--#assuming you have a painted image
local norad = paintutils.loadImage( "myImage" )
paintutils.drawImage( norad, 1, 1 )
--#if you do not have a painted image, you will want to run the paint program on your monitor with the scale set to 0.5  eg:
--#monitor right paint myImage (NOTE: this is not tested, I'm not sure if it will work correctly)
Something like this using the paintutils api.