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

IPs

Started by CCPoster, 22 January 2013 - 07:39 AM
CCPoster #1
Posted 22 January 2013 - 08:39 AM
I was wondering if you guys could make Computercraft more realistict by replacing IDS (like 1) with IPs ( like 1.254.1.168, random number was put here, not someones IP). So could you guys do it? Instead of each time a computer id turned on it gets an ID of +1 of the previous it would be a random generated IP. So the first computer in game would/could be 1.254.1.234, 2.456.213.1, etc
GravityScore #2
Posted 22 January 2013 - 08:45 AM
I like the idea, and think it would make CC more realistic, but I wouldn't want it added :P/>

Wayyyy to much work when typing in an IP, and trying to find them in your Minecraft folder, and it would just be overall more work. You would also have to send them as strings over Rednet, so the IP section of the rednet.receive would be a string, and that change could cause quite a few problems for current programs.
Sebra #3
Posted 22 January 2013 - 08:54 AM
At first sight - unneeded problems.
At second sight - nothing good suggested at all. IP system is quite limited and completely not usable in that mod for any good.
Sorry, think about anything better. ;)/>
CCPoster #4
Posted 22 January 2013 - 09:01 AM
@GravityScore finding the computercraft computers could be the same. The folder would be called 1 (IE) and inside that folder would be a restricted access file (COMPUTERID.resacc) matter fact heres another suggestion, any file with the ending of .resa would be restricted access
GravityScore #5
Posted 22 January 2013 - 09:07 AM
Cloudy stated he's not adding read-only files that the user can create. It's under the list of things not to suggest :P/>
Cruor #6
Posted 22 January 2013 - 09:17 AM
Why not make IPs yourself? You allready got MACs ;)/>
D3matt #7
Posted 22 January 2013 - 03:42 PM
Yep, what Cruor said. IP addressing is above the level that CC provides, which means if you want it you have to make it yourself.
ChunLing #8
Posted 22 January 2013 - 07:37 PM
There was an attempt at making a coordinate based addressing system for an automated rednet relay network. It wasn't finished that I know of, but it was a cool idea.
ElvishJerricco #9
Posted 24 January 2013 - 05:07 PM
Believe it or not, IPs aren't sectioned off numbers forming x.x.x.x. It's actually one number notated with dots separating each 8 bit section of the number. So it's really just one number. Just like computer IDs
NeverCast #10
Posted 24 January 2013 - 05:09 PM
Indeed, and idk about CC, but IPs are indeed 8bit numbers, total a 32bit integer.

So one COULD implement the IP notation
Cranium #11
Posted 24 January 2013 - 05:14 PM
Yes, but why would it need to be so complicated? As it's been said before, it's too easy to write a script for this.
Frederikam #12
Posted 28 January 2013 - 11:54 PM
There was an attempt at making a coordinate based addressing system for an automated rednet relay network. It wasn't finished that I know of, but it was a cool idea.
Oh really? Thanks for inspiration.
ChunLing #13
Posted 29 January 2013 - 05:53 PM
Well, to balance that with some expiration, the reason the project lost momentum was significantly because it had fairly limited utility. A single relay at max height can pretty much cover the area loaded around a player, and a system of max height relays with chunk loaders (and the max height boosted) can more simply be set up on a relay by relay basis than automatically.

Still, you certainly can have your computers/turtle's save a file containing their coordinates (relative or world-based) and use those in a program that would calculate/establish the best relay path between any two computers in the system. If you have enough computers/relays to make it worthwhile, it would be quite an interesting project.
Frederikam #14
Posted 29 January 2013 - 09:05 PM
Well, to balance that with some expiration, the reason the project lost momentum was significantly because it had fairly limited utility. A single relay at max height can pretty much cover the area loaded around a player, and a system of max height relays with chunk loaders (and the max height boosted) can more simply be set up on a relay by relay basis than automatically.

Still, you certainly can have your computers/turtle's save a file containing their coordinates (relative or world-based) and use those in a program that would calculate/establish the best relay path between any two computers in the system. If you have enough computers/relays to make it worthwhile, it would be quite an interesting project.

I would like to build a system of relays, that accept messages that looks like this:

"3.1.10.Message"
This message will go to the relay at x=3 and z=1. When the relay at that position receives the message it will then send "Message" to id 10. I am planning to make an API that can make this kind of messages easily, saving the user some coding. I am still considering how to make the relay get the id of nearby relays. Thunderstorms might be a problem.
NeverCast #15
Posted 30 January 2013 - 09:12 AM
Why.

That's my question, although rhetorical.
Why would you want to use coordinates for relays?
That's crazy! Just stick with numbers. Look at LyqydNet, He already has connection and connection-less networking with nodes and routers.
ChunLing #16
Posted 30 January 2013 - 10:06 AM
To answer that rhetorical question, it is so that the network can automatically calculate the best path to relay a message. To answer the less rhetorical variation, it is so that a network can be expanded or bypass obstacles without needing a top-down redesign of relay paths.

I've never attempted a network large/complex enough for such a protocal to be really useful compared to simply establishing relays on a particular basis. But I can imagine some reasons for doing so. A thunderstorm resistant relay system would be one such reason, as the number of required relays rises dramatically and being able to automatically switch between thunderstorm mode and clear sky mode would significantly increase the difficulty of setting up relays on an individual basis.
NeverCast #17
Posted 30 January 2013 - 10:09 AM
You can map out your network dynamically and use cost analysis to work out the best path. In a thunderstorm that path would change because you can no longer communicate with towers long distances away.

That said, I am open minded, and would be interested in the pro's and con's of a destination mapped network instead of a distance mapped one.
ChunLing #18
Posted 30 January 2013 - 10:15 AM


Yes…that would be the point. But I sense that you are saying something different.
NeverCast #19
Posted 30 January 2013 - 10:22 AM
Hmm I was, though I do see how it applies to this as well.
Wonder if I could implement something like this!
ChunLing #20
Posted 30 January 2013 - 03:19 PM
You definitely could. The question is really just whether it is worth the effort. So far, the answer has usually been no.
NeverCast #21
Posted 31 January 2013 - 11:54 AM
It would be easy to make the network self expanding, and do so very quickly.
Create a turtle and boot it via disk drive, program is loaded up.

Query the network for any missing points in the network and travel there, using GPS + Position Tracking or an API that does that, like turtlex. The turtle zips along to the next 'gap' in the network, sets itself up and starts routing.

Now the network is aware of another node and { x,y,z } and recalculates it's next gap.
You could have an ever expanding network! All you need is disk drive and your software on a disk, and some turtles that make turtles and drop them in front of the drive and power them up!

Oh it's brilliant and amazing and… I must begin at once!

** Disclaimer: I get distracted and bored very quickly, so success is 10%
TheArchitect #22
Posted 01 February 2013 - 04:36 PM
You can map out your network dynamically and use cost analysis to work out the best path. In a thunderstorm that path would change because you can no longer communicate with towers long distances away.
This is the best thing said in this thread. That still brings the problem that you have to know the numbers of the available relay computers, but now that I think about it, it's not VERY different from the real world. The only difference is that in CC you'd have to implement your own relay/router/listener to reply with its own ID identifying itself as a router so that other routers could account for it in routing table analysis.

A whole protocol would need to be produced so that a message with a specific destination computer could be wrapped in a network package that could be passed along between routers, rather than addressing your destination directly.

You'd need nothing new in the mod, but boy this is huge. I'm still sure someone will come along and do it, though, seeing the dedication of all the CC users :)/>
Elemecca #23
Posted 14 February 2013 - 12:48 AM
A whole protocol would need to be produced so that a message with a specific destination computer could be wrapped in a network package that could be passed along between routers, rather than addressing your destination directly.

Such a protocol exists. It's called the Internet Protocol, usually abbreviated as IP. You're using it right now. ;-)
Skullblade #24
Posted 14 February 2013 - 12:53 AM
A whole protocol would need to be produced so that a message with a specific destination computer could be wrapped in a network package that could be passed along between routers, rather than addressing your destination directly.

Such a protocol exists. It's called the Internet Protocol, usually abbreviated as IP. You're using it right now. ;-)
Why must ppl keep bumping a suggestion that was denied SO quickly
??????
Cozzimoto #25
Posted 14 February 2013 - 02:56 AM
A whole protocol would need to be produced so that a message with a specific destination computer could be wrapped in a network package that could be passed along between routers, rather than addressing your destination directly.

Such a protocol exists. It's called the Internet Protocol, usually abbreviated as IP. You're using it right now. ;-)
Why must ppl keep bumping a suggestion that was denied SO quickly
??????

cause they do not read the OP, just the most recent one, to my belief