Jump to content




NORAD map?


  • You cannot reply to this topic
6 replies to this topic

#1 crasher925

  • Members
  • 16 posts

Posted 09 June 2014 - 07: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:

Posted Image


what would be involved in making such a "program"

#2 flaghacker

  • Members
  • 655 posts

Posted 09 June 2014 - 08: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.

#3 crasher925

  • Members
  • 16 posts

Posted 09 June 2014 - 08: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

#4 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 09 June 2014 - 08:49 PM

You can always reduce the text scale of the monitors, with monitor.setTextScale(scale) after wrapping it.

#5 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 09 June 2014 - 09:48 PM

And you can also use ASCII art to make lines.

#6 crasher925

  • Members
  • 16 posts

Posted 10 June 2014 - 12:24 AM

oh ok im a bit of a noob so what would the coding look like?

#7 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 10 June 2014 - 02:24 AM

http://computercraft...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.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users