Hmm. So, the question has come down to whether or not this would help with turtles. . . After much consideration, and a thorough reading of immibis and ChunLing's arguments, I find that, surprisingly (to me at least), I agree with ChunLing. You don't actually have to keep polling the drive if you use some creative redstone
Just tested it, and redstone signals do not pass through disk drives in any way. That means you need two redstone wires, and makes things much bigger, even much bigger than a pair of modems - at least 3x2x3. Why would it be harder to communicate with a 1-block max range than with a 64-block max range?
So, as I see it, this suggestion is about adding a step to take away one step. It's a sidegrade. And not much of one, really, if you have to use it as a peripheral.
The suggestion isn't for a new peripheral. You can already use computers and turtles as peripherals themselves, so eg a computer can reboot another computer it's touching. The suggestion is to add a new peripheral method to that which queues a "contact_message" event.
And, personally, I don't think it is necessary (and this coming from someone who wanted turtle.dropSelf) if it was only going to be base contact usefulness. A small radius, maybe, but that would be stepping on a few toes, and kinda make modems near-superfluous to the advanced and wasteful coder. (ie. Me)
You've never programmed a turtle do this?
- Wait for command while sitting at base location.
- Execute command, possibly moving away from base location.
- Return to base location.
- Repeat.
Combine that with any communications network not based on wireless modems - so that it can't move with the turtle - and you can see why you'd want a computer to receive messages and queue them for the next time the turtle is idle.
(Hell, why are computers in Minecraft to begin with?).
They're not… they're in ComputerCraft, a Minecraft mod. Unless you meant redstone computers.
Having wireless turtles back / an extra peripheral slot for wireless turtles would be a way to go about it. Otherwise, turtle's as explorer's equipped with peripheral's would have to be coming back to base to report.
If you want wireless communication, you need a peripheral slot. If you don't want wireless communication, you don't need a peripheral slot.
Also if modems had their own peripheral slot there'd be no reason not to put one on every turtle.
Your example suggested using this to communicate with turtles. Turtles movement functions eat events, and if you use the turtle.native functions, there are significant performance issues since they do not yield. This means that you really can't feasibly just put a rednet_message event in place and have the turtle come get it. The turtle has to be in the right place when the message is sent, so you need to poll for the turtle being there.
You get a peripheral event when the turtle moves next to the computer and a peripheral_detach event when it moves away. Alternatively, you could program the turtle to send a message to the computer every time it finishes a task and is ready for another.
You won't be using any turtle functions while receiving contact messages, because then the turtle would be moving so it wouldn't be touching the computer. It doesn't matter if the turtle moves while you're not trying to send it messages, of course, as long as it comes back eventually.
I don't see the relevance of turtle.native here.
Yes, this can probably still be quicker than disk access, taken in absolute terms. But the difference is less than a game tick, which is the threshhold of negligibility for CC.
I'm not sure if you're talking about latency (time between the message being sent and being received) or server CPU time here.
The latency can be anything up to the polling interval (how often you're checking for messages). Eg: If I send you an email, and you check your email every 24 hours, then it could be up to just under 24 hours before you see it.
The CPU time used for one check is small, much less than a game tick, but it adds up when many turtles are doing it every tick. Probably wouldn't be enough to cause noticeable lag, though.
Constant polling is a strawman, the suggested uses of this contact communication system do not as yet include any constant communication, so the polling would be occasional.
When communication does occur, how would you notice it without polling? You could poll say every 5 minutes, but then it's up to 5 minutes before the computer notices.
*types command for sorter to put 64 cobblestone in the furnace*
*5 minutes later, sorter turtle notices command and puts 64 cobblestone in the furnace*
*5 minutes later, UI computer notices response and tells me the command was successful*