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

Rednet repeater - RAM Friendly way to transfer rednet through unloaded chunks

Started by matejdro, 11 November 2012 - 05:58 AM
matejdro #1
Posted 11 November 2012 - 06:58 AM
First, I know I have posted this in another thread, but i thought it deserves its own.

Anyway, currently only way to transfer rednet through large distance is with a bunch of computers serving as a repeaters. But problem is that those computers need chunks to be loaded for them to work. Solution is simple, just put down some chunk loaders. But while this is fine on singleplayer or small servers, but it can be heavy burden for big servers.

Imagine server with 100 players, all spread around the map. Then everybody wants to have rednet link to their distant bases, other player etc. You would need huge network with a lot of chunkloaders that would put heavy burden on server's RAM and CPU usage. And its pointless. Why would you need to keep whole chunk loaded just to let one signal through?

That's why it would be cool to have Rednet Repeaters.

They would function similarly to current Computer repeaters, except that they would also work when chunk is unloaded. I don't think this is very hard to implement. CC would just need to keep list of repeaters. Each time player places/breaks repeater, it would add/remove location from its list.

Rednet signal would work that way then:
1. When you send message, computer would check if message reached destination. If it didn't (or you broadcast), it would search if there are any repeaters nearby and send message to all of them.
2. For each repeater, it would perform same check. If message reached its destination, it would stop. Otherwise, it would just broadcast to other nearby repeaters.

I think this is good alternative to computer repeaters and it's not OP. You still need to create your network by yourself, just more server resource friendly.

Poor drawing of a concept:

(Green = loaded area, Red = unloaded area, Dark blue = modems (attached to a computer or turtle), Light blue = repeaters)
PixelToast #2
Posted 11 November 2012 - 08:18 AM
i made a network that does this
it dosent check if the message was delivered every single time a message is sent
only the first time when it checks the path to the computer, then it saves the path in a table that is used every time its sent

still though, repeaters have been requested, make your own *tableflip*
a better suggestion would be to have a peripheral that loads just the computer and not the whole chunk its in
Sammich Lord #3
Posted 11 November 2012 - 10:52 AM
Or, just increase the rednet range in the config file.
matejdro #4
Posted 11 November 2012 - 11:57 AM
Peripheral that loads computer in memory would probably be quite complicated (Although I'm not sure how is that implemented), while repeaters would be just creating simple list.

Changing range in config is cheating.
PixelToast #5
Posted 11 November 2012 - 12:09 PM
Changing range in config is cheating.
no its not, the range wasnt intended to add balance but to prevent the entire server from getting spammed with messages
and trust me, 500 blocks is a LONG way
ElvishJerricco #6
Posted 12 November 2012 - 12:30 PM
Changing range in config is cheating.
no its not, the range wasnt intended to add balance but to prevent the entire server from getting spammed with messages
and trust me, 500 blocks is a LONG way

It really kinda is cheating. It's better to design tech to work under any circumstance. So a software like this should account for the fact that computers may be out of range. And you can't change the configs on a server.
PixelToast #7
Posted 12 November 2012 - 01:36 PM
And you can't change the configs on a server.
server/config/mod_ComputerCraft.cfg
yes you can
ElvishJerricco #8
Posted 12 November 2012 - 03:03 PM
And you can't change the configs on a server.
server/config/mod_ComputerCraft.cfg
yes you can

I didn't mean that they can't be changed. I meant you can't change them if it's not your server.
ChunLing #9
Posted 12 November 2012 - 09:10 PM
You can't upgrade to the next version of CC either. So what exactly is the gain? If the server admins don't want long range rednet relay to be possible, or they're not worried about lag from requiring world chunk anchors for the relays, then there is no particular reason for this.

Personally, I think that setting high altitude max range to a couple of kilometers is far more realistic than a lot of things in minecraft and core CC. The setting is configurable, if someone needs this then they can configure it.