Workaround for lack of persistance?
#1
Posted 26 February 2015 - 01:32 PM
If not, is there an addon that adds something to check XYZ / direction for turtles? I've seen things that do one or the other, but not both. And having to move forward / back just to check facing is... suboptimal. GPS isn't something I like, due to the limited range. I'd increase the range, but there's no way to increase the range of GPS without increasing the range of wireless modems, that I know of at least.
#2
Posted 26 February 2015 - 01:48 PM
GPS range is indeed equal to modem range - modem messages carry a tag indicating the distance they travelled, and the GPS API is merely a chunk of code that calls for messages from a number of systems that already know their location, examines the distance tags, and figures out where the asking system must be based on that data.
Modem range gets higher as you approach world-height, and only the range of the highest system matters when determining if two systems can communicate. Thus a GPS cluster up the top of your map can cover a bit over a few hundred blocks (bearing in mind that I'm talking about the radius of a sphere, not a plain circle).
In the case of mining turtles - ones dedicated to gathering materials, as opposed to digging holes of certain shapes - I don't think it should much matter if they know where they are or not. Give them an ender chest to carry, attach a chunk loader peripheral, set them loose in the world (er, or in a mining / MystCraft age) and forget about them.
#3
Posted 26 February 2015 - 03:51 PM
Bomb Bloke, on 26 February 2015 - 01:48 PM, said:
Bomb Bloke, on 26 February 2015 - 01:48 PM, said:
Bomb Bloke, on 26 February 2015 - 01:48 PM, said:
Secondly, this is not a mining turtle. I'm looking for something that should be easy - and would be easy if CC were persistant. However, it still isn't. So I'm looking for a workaround.
(I got fed up enough with CC that I'm writing a persistant forth intrepreter, because I found it easier than trying to deal with the lack of persistance in CC. (And that's saying something...) And for most things it seems to work. But even that doesn't work for turtles / external observables, because of the aforementioned state inconsistancies with saving to files. And even without the state inconsistancies, I've found no way to detect if a turn was actually completed or not, among other things.)
#4
Posted 26 February 2015 - 04:21 PM
#5
Posted 26 February 2015 - 04:42 PM
MKlegoman357, on 26 February 2015 - 04:21 PM, said:
Minecraft only saves the world every so often. As a result, what can happen is that you write the file, the file saves to disk, then MC exits unexpectedly and doesn't save the block data. As a result, your data saved to disk is out of sync with the world - you have an older version of the block data but a newer version of the file data.
And even if it did work as expected, there is still a race condition here if it exits between doing the operation and updating the file. I've had this happen with quarry turtles before.
Edited by The Lone Wolfling, 26 February 2015 - 04:42 PM.
#6
Posted 26 February 2015 - 04:49 PM
Also, it would almost certainly be easier to create a peripheral mod to give turtles their coordinates and facing direction than to re-create their functionality in another mod (though, amusingly enough, that's roughly what Sangar, the author of the post linked above, did with OpenComputers). And of course, if persistence is the biggest priority for you, you may want to look into whether OpenComputers is a better fit for you, if neither of the options above work for you.
#7
Posted 26 February 2015 - 08:38 PM
Lyqyd, on 26 February 2015 - 04:49 PM, said:
Also, there's a comment to the effect of LAMA not working with CC 1.63. I'll have to check if it works with 1.73, but I'm not optimistic.
Not to mention this still doesn't work with axillary state. Unless I'm missing something?
LAMA would be great if it works, and if it allows saving of axillary state that remains synced with world state.
Lyqyd, on 26 February 2015 - 04:49 PM, said:
I'll think about making a peripheral mod, but I'd rather not make mods just work work around bugs in other mods if I don't have to.
#8
Posted 26 February 2015 - 08:53 PM
Did I misinterpret your comment about making a Forth interpreter? I had thought you meant that you were creating a turtles-esque mod using a language that would be easier to serialize state and this achieve persistence. If you instead meant that you were creating a Lua program that is a Forth interpreter, that's potentially a viable strategy for program persistence, but would still need something like LAMA to be able to know if a turtle movement succeeded or failed if ot occurred across an unload/reload.
And I agree about OC, just figured I'd throw it out there in case you weren't already aware.
#9
Posted 26 February 2015 - 10:29 PM
Lyqyd, on 26 February 2015 - 08:53 PM, said:
Lyqyd, on 26 February 2015 - 08:53 PM, said:
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











