71 posts
Location
Latvia
Posted 22 February 2013 - 03:25 AM
I have written a program for mining turtle that saves turtles current position and if chunks get unloaded then loaded again (like if you disconnect/connect) it will continue doing it's work.
Here is when the bug occurs that if chunks get unloaded then sometimes it just stops and acts like it's finished, and sometimes it just keeps digging till it reaches bedrock and stops there (there was fuel inside).
So, I can't find the part, that's messing the whole thing up.
Pastebin link:
http://pastebin.com/EeXAbRsNEdit: Sometimes after relog it starts going forward on wrong side aswell.
71 posts
Location
Latvia
Posted 22 February 2013 - 09:59 AM
Anyone?
2005 posts
Posted 22 February 2013 - 10:03 AM
Yeah…you perform a bunch of functions in between saves. That means that, depending on which function was last performed, your position saves end up inaccurate in different ways.
To get the best saving, you need to save right before and right after every move. And even then you'll still have some problems that can't really be solved until full programming persistence is implemented in CC (they really are working on that).
Edited on 22 February 2013 - 09:05 AM
71 posts
Location
Latvia
Posted 23 February 2013 - 01:36 AM
Yeah…you perform a bunch of functions in between saves. That means that, depending on which function was last performed, your position saves end up inaccurate in different ways.
To get the best saving, you need to save right before and right after every move. And even then you'll still have some problems that can't really be solved until full programming persistence is implemented in CC (they really are working on that).
That's sad that I can't get super precise saving system then… OK, thanks.
2005 posts
Posted 23 February 2013 - 09:01 AM
If you use GPS, then you don't need precise position saving. Then it's just a matter of tracking your program's general progress.
71 posts
Location
Latvia
Posted 23 February 2013 - 09:41 AM
If you use GPS, then you don't need precise position saving. Then it's just a matter of tracking your program's general progress.
Well, GPS is not the way to go, because I don't want to place 4 computers with wireless modems everywhere I place my turtle, so I guess I will just have to live with this saving system until they implement required things..
2005 posts
Posted 23 February 2013 - 09:55 AM
Well, they really are making pretty good progress on that, from what I can tell (which is to say…there are revisions of the basic APIs and available functions in the latest versions that indicate serious work on throughly integrated persistence).