Jump to content




Openperipheral: Redirect Terminal To Terminal Glasses!


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

#1 Hazrock

  • Members
  • 16 posts

Posted 30 August 2013 - 09:01 PM

Attached Image: 2013-08-30_20.42.08.gif

This program redirects the terminal to a terminal glasses bridge. (default back side)
  • Full color support!
  • Works flawlessly in singleplayer (you may experience image ghosting in multiplayer, re-equip glasses to fix)
  • Complete control of your computer, remotely!
    • Run a command starting with $$ (e.g. "$$rom/programs/secret/alongtimeago\n") to "type" that on the terminal
    • escape codes for various key combinations:
      • \n simulates a press of the enter key
      • \b for backspace
      • \t \r \s for Ctrl + T, Ctrl + R, Ctrl + S
  • Very configurable! Size & position of screen, even individual color codes and background opacity!
  • To download, simply run "pastebin get MCjPAhyz CcGlasses". Then run it at startup via your favorite method (renaming it to "startup", placing a shell.run() in startup, etc.)
Note: Written for ComputerCraft 1.53 and OpenPeripheral 0.1.9. May work on newer and older versions, not tested.

It works by running term.redirect() against a fake monitor object. With a little bit of work, you could redirect to the object at will, and manipulate it as a standard monitor. Note also that while there is a mon.setTextScale() method implemented, it is completely untested, as term does not make use of it.

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 30 August 2013 - 09:53 PM

An advisory: it would be unwise to use this in an SMP server without prior approval from the admins, as the terminal glasses have a tendency to cause significant load and/or noticeable lag.

#3 Zudo

  • Members
  • 800 posts
  • LocationUK

Posted 01 September 2013 - 09:04 AM

Very nice!

#4 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 01 September 2013 - 09:26 AM

View PostLyqyd, on 30 August 2013 - 09:53 PM, said:

An advisory: it would be unwise to use this in an SMP server without prior approval from the admins, as the terminal glasses have a tendency to cause significant load and/or noticeable lag.

I've not had any bug reports relating to that, except of course, when people try to render images to their screen and crazy stuff like that, which is purely client-side lag.

Have I missed something?

(Very cool Hazrock! Seen Gopher and some others do similar before. It's an awesome idea)

#5 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 01 September 2013 - 02:51 PM

At one point, I used nsh over it, which was enough to cause some minor but noticeable lag. Gopher mentioned seeing someone get banned from a server for causing lag specifically by using the terminal glasses. I don't have good reproduction instructions, but there are/were definitely a few lag-related issues with them.

#6 Rougeminner

  • Members
  • 151 posts

Posted 14 September 2013 - 12:23 AM

View PostHazrock, on 30 August 2013 - 09:01 PM, said:

Attachment 2013-08-30_20.42.08.gif

This program redirects the terminal to a terminal glasses bridge. (default back side)
  • Full color support!
  • Works flawlessly in singleplayer (you may experience image ghosting in multiplayer, re-equip glasses to fix)
  • Complete control of your computer, remotely!
    • Run a command starting with $$ (e.g. "$$rom/programs/secret/alongtimeago\n") to "type" that on the terminal
    • escape codes for various key combinations:
      • \n simulates a press of the enter key
      • \b for backspace
      • \t \r \s for Ctrl + T, Ctrl + R, Ctrl + S
  • Very configurable! Size & position of screen, even individual color codes and background opacity!
  • To download, simply run "pastebin get MCjPAhyz CcGlasses". Then run it at startup via your favorite method (renaming it to "startup", placing a shell.run() in startup, etc.)
Note: Written for ComputerCraft 1.53 and OpenPeripheral 0.1.9. May work on newer and older versions, not tested.

It works by running term.redirect() against a fake monitor object. With a little bit of work, you could redirect to the object at will, and manipulate it as a standard monitor. Note also that while there is a mon.setTextScale() method implemented, it is completely untested, as term does not make use of it.

Now that is truly amazing

#7 ZEKROM67

  • Members
  • 7 posts

Posted 21 September 2013 - 07:47 AM

Epic. I'll try this one.

#8 willwac

  • Members
  • 182 posts

Posted 22 September 2013 - 12:25 PM

pretty cool!

I'll probably use it forever :D

How do I press CTRL?

#9 BenjiButton

  • Members
  • 3 posts

Posted 05 December 2013 - 08:33 AM

where is the code I can't find it?

Edit: oops found it now
pastebin get MCjPAhyz

Edited by BenjiButton, 05 December 2013 - 11:51 AM.


#10 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 05 December 2013 - 10:47 AM

Try slowing down and actually reading the original post.

#11 DarkHearted1

  • New Members
  • 1 posts

Posted 02 November 2014 - 01:33 AM

I would like to use this for my main base comp, but when I try to, it gives me this error:

startup:25:attempt to index ? (a nil value)

which I'd assume is being caused by "mon.box.setZIndex(-1)", probably because I'm trying to use it in CC 1.63.

If this is why, and it can't really be fixed, that's fine. I just figured I'd see if anyone who knows a little more than I do might know a way to fix it.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users