This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Modem distance?
Started by Edman, 08 October 2012 - 02:36 AMPosted 08 October 2012 - 04:36 AM
Me and my friends are trying to set up a chat on our server. One of my friends is a tad out of reach. Is there a way we can put the modem on a tower above his house? Thanks guys<3
Posted 08 October 2012 - 06:28 AM
If you place them on ground-level it's 64-blocks, and 16-blocks during a storm. If you increase the altitude of the modums (towers and stuff) the range can get up to 384-blocks
Posted 08 October 2012 - 06:33 AM
You can't put the modem anywhere other than next to the computer.
Posted 08 October 2012 - 07:15 AM
Well you could make the chat computer to talk to another computer up in the sky.
Like when you send a message, the message goes up to the tower and then sends it further.
And when you receive a message, the signal goes directly to the chatting computer.
Like when you send a message, the message goes up to the tower and then sends it further.
And when you receive a message, the signal goes directly to the chatting computer.
Posted 08 October 2012 - 11:00 AM
If you have bundled cable, there's probably a way of hooking up to a modem since the modems run on the same system as bundled cable.
But yeah, either relay the messages through another computer/turtle or get your friend to move higher. I know, it's an annoying system, but beyond going into the config and changing the default distance, there's not much you can do.
But yeah, either relay the messages through another computer/turtle or get your friend to move higher. I know, it's an annoying system, but beyond going into the config and changing the default distance, there's not much you can do.
Posted 08 October 2012 - 11:12 AM
Hmm… What is the best way to code a relay? Because if it just broadcasts the messages then it would send it back to the same computer?
while true do
for i = 1,1000 do
local id, msg = rednet.receive()
if i ~= id then
rednet.send(i, msg)
end
end
end
Would that be the best way? (Just a example)Posted 08 October 2012 - 11:15 AM
Hmm… What is the best way to code a relay? Because if it just broadcasts the messages then it would send it back to the same computer?
Would that be the best way? (Just a example)
ok, example with 3 computers:
computer 0 - the relay computer
computer 1 - your pc
computer 2 - your friend's pc
C0 recieves a message from C1, it checks if it's from C2, since it isn't it forwards the message to C2.
C0 recieves a message from C2, it checks if it's from C2, since it is, if uses a command at the start of the message to determine the destination and send it to the right computer.
If you need a code example, I can make one of those.
Posted 08 October 2012 - 12:44 PM
If you have bundled cable, there's probably a way of hooking up to a modem since the modems run on the same system as bundled cable.
No, it doesn't. They are two completely separate systems which happen to share an interface.
Posted 09 October 2012 - 01:58 AM
I have actually TRIED this and it is used in my world.
Put the wireless modem on the TOP of the computer, then type "label set wirelessTowerNumber then "edit startup" and type
rednet.open("top") ;
id, message = rednet.receiver()
print("Sending: Message: "..message.." From the computer ID of: "..id.."!") ;
rednet.broadcast(""..message.."") ;
Recomended code you use for the messages(the thing the computer reads)
id, message = rednet.receive()
print("Got the message: "..message.." from "..id.."!") ;
To read the message, recomeded code:
first 1/2/3/4/5/6/7/8/9/10 digits of the reader would read the ID it's being sent to, recomended you send it to the tower. Then the message. The computer will then read this and look for its ID if you do it right, (It's too hard to explain) if it finds its ID it looks at the message and shows it to you.
Put the computer that you write this on at a REALLY high altitude for really high ranges. I recomend you code it inside your house and do the naming step so you can just break it and move it.
Put the wireless modem on the TOP of the computer, then type "label set wirelessTowerNumber then "edit startup" and type
rednet.open("top") ;
id, message = rednet.receiver()
print("Sending: Message: "..message.." From the computer ID of: "..id.."!") ;
rednet.broadcast(""..message.."") ;
Recomended code you use for the messages(the thing the computer reads)
id, message = rednet.receive()
print("Got the message: "..message.." from "..id.."!") ;
To read the message, recomeded code:
first 1/2/3/4/5/6/7/8/9/10 digits of the reader would read the ID it's being sent to, recomended you send it to the tower. Then the message. The computer will then read this and look for its ID if you do it right, (It's too hard to explain) if it finds its ID it looks at the message and shows it to you.
Put the computer that you write this on at a REALLY high altitude for really high ranges. I recomend you code it inside your house and do the naming step so you can just break it and move it.
Posted 09 October 2012 - 02:07 AM
From what I understand the distance is usually 64 but seems to be configurable in the config :D/>/>
Posted 13 October 2012 - 04:22 AM
If you have bundled cable, there's probably a way of hooking up to a modem since the modems run on the same system as bundled cable.
No, it doesn't. They are two completely separate systems which happen to share an interface.
That seems kind of illogical, or at the very least Lazy.
Posted 13 October 2012 - 05:24 AM
if you don't like it, make your own mod.
Seriously, one is an interface to another mod, which involves serializing all the data into bits with control signals and sending it one bit at a time. The other is dedicated original code that sends whole strings as strings without significant processing. Why would they be built on the same code?
Seriously, one is an interface to another mod, which involves serializing all the data into bits with control signals and sending it one bit at a time. The other is dedicated original code that sends whole strings as strings without significant processing. Why would they be built on the same code?
Posted 02 November 2012 - 02:10 PM
If you have bundled cable, there's probably a way of hooking up to a modem since the modems run on the same system as bundled cable.
No, it doesn't. They are two completely separate systems which happen to share an interface.
That seems kind of illogical, or at the very least Lazy.
Rule 1 of CC forums: always agree with Cloudy. :D/>/>
EDIT: You see, I made cloudy angry. Revised rule 1: never insult cloudy.
Posted 02 November 2012 - 04:01 PM
No, it doesn't. They are two completely separate systems which happen to share an interface.
That seems kind of illogical, or at the very least Lazy.
Rule 1 of CC forums: always agree with Cloudy. :D/>/>
I have a right to my own opinion, if my opinions happen to differ to someone else's, that's life.
Posted 03 November 2012 - 08:20 AM
Why is it illogical or lazy? Rednet wires came first. Dan then added wireless modems that worked in exactly the same way - and worked with existing program's. What was the point in a new user facing API when the existing ones worked?
And I don't care if people agree with me or not - I have my opinions, others differ - but both are equally as valid.
And I don't care if people agree with me or not - I have my opinions, others differ - but both are equally as valid.
Posted 03 November 2012 - 08:56 PM
Why is it illogical or lazy? Rednet wires came first. Dan then added wireless modems that worked in exactly the same way - and worked with existing program's. What was the point in a new user facing API when the existing ones worked?
And I don't care if people agree with me or not - I have my opinions, others differ - but both are equally as valid.
It's illogical because using the rs API creates an unnecessary dependency. Also, as modems are a block implemented Java side, it makes more sense that the crucial functions of the API be assigned in the Java/C code.