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

Rednet distance problems

Started by Hiran, 19 July 2015 - 03:59 AM
Hiran #1
Posted 19 July 2015 - 05:59 AM
Rednet is nice,but the problem is distance. But since we have cloud services etc. it should be possible to exchange orders via that. Do you know any good service / API / anything that might help me with it?
Grim Reaper #2
Posted 19 July 2015 - 06:07 AM
If you're looking for an easy solution to overcome limited rednet distance, you could just edit the mod's config file to allow for a grossly large distance. Are you playing in singleplayer world or server? Of course, though, this is the easy way out.
Bomb Bloke #3
Posted 19 July 2015 - 06:13 AM
http://www.computercraft.info/wiki/Repeat
Hiran #4
Posted 19 July 2015 - 07:46 AM
If you're looking for an easy solution to overcome limited rednet distance, you could just edit the mod's config file to allow for a grossly large distance. Are you playing in singleplayer world or server? Of course, though, this is the easy way out.
Singleplayer, but i dont want to create app that will be useful to other people who edit configs.

I know about things like that.
But placing computers in the world and keeping their chunks loaded just to use basic base monitoring has 2 flaws:
-Will work only in single minecraft world, in the every new world you will have to create new network of repeaters
-Won't work across dimensions.

I was thinking about something more… global. I'm sure that someone created something similar. Besides this would have way more uses than monitoring how many items i have in my AE network :P/>
flaghacker #5
Posted 19 July 2015 - 09:50 AM
This may be what you're looking for.
Edited on 19 July 2015 - 07:51 AM
Hiran #6
Posted 19 July 2015 - 12:16 PM
https://github.com/vincasmiliunas/lua-basic-google-drive/blob/master/lua-basic-google-drive/example.lua

http://www.fixstars.com/en/news/?p=451

These 2 look interesting :P/>

Can someone better with web stuff tell me if they will be of any use? :P/>
Grim Reaper #7
Posted 19 July 2015 - 06:13 PM
https://github.com/v...ive/example.lua

http://www.fixstars.com/en/news/?p=451

These 2 look interesting :P/>

Can someone better with web stuff tell me if they will be of any use? :P/>

I've looked through a decent bit of the code for the first of these two projects, and I think it might be possible to use it, but I don't think it would be worth it. You would have to translate all of the operations performed by the cURL API import into calls from the HTTP API in CC, something I'm not sure is even possible. On top of that, a fair amount of the dependencies have OTHER dependencies, making the final code-base much, much larger.

For the second suggestion, it seems that you'd have to translate working with HTTPS into HTTP for CC, and again, I don't think that's possible. However, I'm not the best with web stuff, so don't take my word as gospel.
Hiran #8
Posted 19 July 2015 - 06:55 PM
When i posted both of those links I was thinking "What if we use something like online drive as our data storage".

This project is huge, and you have to have that certificate and whatnot from google, at least that's what i saw. Im also not to good with that kind of stuff, that's why im asking pros here.

If it's possible to translate that we could have ultimate online data storage system. Just change that into API and no one will have to use rednet for long distance transmission.

Edit:

http.request("https://www.facebook.com")
local requesting = true
while requesting do
  local event, url, sourceText = os.pullEvent()

  if event == "http_success" then
	local respondedText = sourceText.readAll()
  
	sourceText.close()
	print(respondedText)
  
	requesting = false
  elseif event == "http_failure" then
	print("Server didn't respond.")
  
	requesting = false
  end
end
If CC didn't support https facebook wouldn't respond right? However i got some response that was followed by error from window api :P/>

Edit:
I have a feeling that this topic shifts from "how to omit rednet distance" to "how to connect with google drive" xD
Edited on 19 July 2015 - 08:23 PM
Bomb Bloke #9
Posted 20 July 2015 - 02:48 PM
If you're looking to use a webserver as an alternative to rednet, I recommend against it - unless you're planning on a very limited amount of traffic. Constant connections will only cause you trouble when your chosen host's flood control systems notice and block you. If your chosen host lacks flood control, this is the sort of thing that'll encourage them to implement it.

If you don't want to invest in the occasional spot loader to cover repeater systems, and you don't want to change the ComputerCraft config (these being the two solutions that're built right into the mod for you to use!), then your best solution is to use a different mod to sort things out for you.

MoarPeripherals offers a BitNet tower with a range covering 3000 blocks.

Many packs have Enderstorage Enderchests available. One of these in conjunction with a floppy disk and some turtles / disk drives will let you transport data pretty much anywhere.
Hiran #10
Posted 20 July 2015 - 04:18 PM
If you're looking to use a webserver as an alternative to rednet, I recommend against it - unless you're planning on a very limited amount of traffic. Constant connections will only cause you trouble when your chosen host's flood control systems notice and block you. If your chosen host lacks flood control, this is the sort of thing that'll encourage them to implement it.

Not sure what you meant by constant, but if few messages every few seconds are too much then that blocks almost everything i had in mind, and its not worth to fight with this for few last things.

I wanted to create data sharing system that would be independent from config (as much as possible) so it could be used by those who dont have access to configs, like server players, thats why i didnt want to use repeaters or edit configs.
But if thats the case then I will just bump rednet configs to infinity, that would be easier for my pc than chunkloading area between parts of my base.