Posted 27 August 2013 - 07:47 PM
Title: How can I make my turtle tunnel-digger more efficient?
Here is my code: http://pastebin.com/XCjtyr04
Anyways, currently this makes a turtle dig a tunnel. Thing is… it's really inefficient. For example, the turtle goes from the bottom left up to the height of the tunnel, then back down, and to the right. It does this for the whole width, and then goes back all the way to the left to do the exact same thing again, just 1 deeper.
Here's a visual: http://i.imgur.com/64J4cfI.png
So essentially it goes up * height, down * height, right 1, repeat.
It would be way better to go up height, right, down height, right, repeat. However I don't know how to do that.
This also works for the depth too, it goes all the way to the original starting position, just one block deeper. If I could just have it stay on the right side and work from right to left instead it wouldn't waste that pointless time and fuel.
I'm not all that good, what can I do to make this more efficient? It's fairly simple now and I want to make all my own programs without having to download others, because that's not as fun. Also learning can't hurt.
Here is my code: http://pastebin.com/XCjtyr04
Anyways, currently this makes a turtle dig a tunnel. Thing is… it's really inefficient. For example, the turtle goes from the bottom left up to the height of the tunnel, then back down, and to the right. It does this for the whole width, and then goes back all the way to the left to do the exact same thing again, just 1 deeper.
Here's a visual: http://i.imgur.com/64J4cfI.png
So essentially it goes up * height, down * height, right 1, repeat.
It would be way better to go up height, right, down height, right, repeat. However I don't know how to do that.
This also works for the depth too, it goes all the way to the original starting position, just one block deeper. If I could just have it stay on the right side and work from right to left instead it wouldn't waste that pointless time and fuel.
I'm not all that good, what can I do to make this more efficient? It's fairly simple now and I want to make all my own programs without having to download others, because that's not as fun. Also learning can't hurt.