31 posts
Posted 30 January 2020 - 12:23 PM
I'm wondering how reliable the rednet is. Do we need to wrap a Transfer Control Protocol upon rednet's raw api?
2427 posts
Location
UK
Posted 30 January 2020 - 04:05 PM
No, computercraft doesn't simulate packet lose (in fact rednet/modem messages don't even leave the Minecraft server that the game is running on)
If you appear to be having packet loss then here are some things to check
- Is the intended receiver listening? For rednet, check that you have called rednet.open(<sideWithModem>) or use the receive function on the API. For the modem API, make sure that the channel is open.
- Is the transmitter sending it to the right place? For rednet, check the ID parameter. For the modem API, check the channel.
- Is the cable too long (wired only)? The max is 256 if I recall correctly, you can use the repeat program on a computer which breaks the long cable into two smaller ones.
- Are they in range (wireless only)?
- Range reduces as you go lower in the world (this is why people place relays near the top of the world).
- Only one computer needs to be in range for the two to be able to send in both directions (also why people use the top of the world).
- Thunderstorms significantly reduce the range of wireless modems (which affects both the modem API and the rednet API).
Edited on 30 January 2020 - 03:07 PM
31 posts
Posted 31 January 2020 - 05:15 AM
Thank you for your detailed explaining!
And there is still another questoin: does computercraft simulate network delay? What about different modem devices?
2427 posts
Location
UK
Posted 31 January 2020 - 08:40 AM
Computercraft doesn't simulate network delay. However, if you have a large network with multiple relays to reach the destination then you may notice a slight delay because each message has to go through each of the relays.I doubt that you will ever make a network large enough to notice this though.
As for different modem devices, there are two variants of wired modem and two types of wireless ones.
- The two wired ones work same except that the full block one can connect multiple peripherals together in one block space and it allows non-full blocks (such as chests) to be connected (chests are not peripherals unless you have plethora installed, also if you have used open peripherals then the full block modem replaces the peripheral proxy).
- The two wireless ones are more different, the grey one is the normal one and the one you will want to use most often, this is the one with the range limitations. The other is the golden ender modem, this has enough range to cover most worlds on its own and can transmit to other ender modems in different dimensions, you will likely only need five of these per dimension (four for GPS and one for relay. or if one of your GPS computers does double duty then you only need 4 ender modems per dimension)
Edited on 31 January 2020 - 07:40 AM
477 posts
Location
Germany
Posted 12 February 2020 - 09:03 PM
No, computercraft doesn't simulate packet lose (in fact rednet/modem messages don't even leave the Minecraft server that the game is running on)
While ComputerCraft doesn't simulate packet loss per se, you might loose the modem_messsage(or rednet_message) events if the event queue is full. Although this should only happen in really rare circumstances, so usually you won't need to worry about that.