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

Remote Screens

Started by Twijn, 22 September 2015 - 01:49 AM
Twijn #1
Posted 22 September 2015 - 03:49 AM
What is it?
Remote Screens is a new program that allows some person (the host) to "stream" their screens to other computers. *note: this is still in very early development. There are issues.

How does it work?
Remote Screens overwrites all term.write/term.setCursorPos/etc methods to stream it to other computers. The program assumes that the screen sizes are the same.
This additionally uses my API, Rednet Addons. Get it here: http://www.computerc...-rednet-addons/ NOTE: If you are installing this program then DO NOT install rednet addons. It will download the installer and run it.\

Note:Note: You may realize that the first time running Host it will create an ID. This will be your id for the computer until you delete the "hostCode" file. I am using this instead of computer IDs because I have some plans in the future to make this work better. ;)/>

How to get it
To get Remote Screens, simply run this in your computer:

pastebin run Fz5BDzGk

It will come up with a screen asking if you want to download the host or the receiver, then download the specified file and will download rednet addons.

Added Functions
In addition to overwriting some current "term" functions, it also adds 2 functions:
term.remoteScreenOn()
term.remoteScreenOff()
**NOTE: The host file must have been started before using these functions!

Both of these are fairly self explanatory, however it could be important to note that running term.remoteScreenOn() will clear both the host's screen as well as any receivers attached to it.

I found a bug!
Please comment your bugs down below as I can already tell there are some. Some known bugs:
Spoiler- It sometimes will not finish printing images/complex UIs. The current cause is unfortunately unknown as it could be the loops on the receivers not be fast enough, or Rednet gets buggy once sending a lot of text at a time.

Notes
This thread is just filled with notes, isn't it?

- This program will clog up Rednet. It is recommended you use wired modems.

- You MAY use shell.run to start "Receive", just know that you need to add the argument of the id. You unfortunately cannot use it with "Host" because you will need to confirm. This will be fixed in a later version.

- This program doesn't have many uses, I just basically wrote it to allow people to copy screens (such as RF monitors) onto other places, because RF monitors can take a bit of processing and math (when this doesn't use AS much). I'm not exactly sure if it works correctly with monitors, however I will be adding full support in the near future.
Edited on 22 September 2015 - 08:47 PM
Tag365 #2
Posted 30 September 2015 - 10:20 PM
Nice. If you need to be able to control another computer, use this: http://www.computercraft.info/forums2/index.php?/topic/23144-remote-terminal-control-a-computer-from-another-computer/page__p__216457#entry216457
Konlab #3
Posted 03 October 2015 - 12:33 PM
Sounds very interesting. Idea: not tried it but maybe you can send term.current() with rednet?
About filling the rednet, why just don't use the modem API instead? With another channel? For each pair of computers?
Is it hashed?
Using modems is really dangerous, EVERY computer gets the message, even with rednet.send(), if they opened channel 65535.
Edited on 03 October 2015 - 10:33 AM
Twijn #4
Posted 05 October 2015 - 01:01 PM
Sounds very interesting. Idea: not tried it but maybe you can send term.current() with rednet?
About filling the rednet, why just don't use the modem API instead? With another channel? For each pair of computers?
Is it hashed?
Using modems is really dangerous, EVERY computer gets the message, even with rednet.send(), if they opened channel 65535.

I will try to get those features in the next update. :-) Also, I have quite a few new features that will make connecting way easier.