Jump to content




MLG Mining: Circular Branch Mining


358 replies to this topic

#1 Ulthean

  • Members
  • 171 posts

Posted 06 December 2012 - 10:18 PM

I am currently working on my master's thesis and won't be able to answer questions/continue development until the end of march. If you have any questions still feel free to post them, already some amazing forum members have stepped up to provide other users with feedback/solve their problems.

Summary
Like many before me, I too have made a branch mining program (or rather, programs), this time, a circular mining design. With the default parameters, which will be discussed later, these programs will:
  • DigTunnels: Dig the 4 main tunnels (this step is optional)
  • DigShafts: Dig out the branching mining shafts (this step is optional but highly adviseable, else the inventory will fill up too fast)
  • DigOres: The main program: excavates all ore veins in those shafts
  • DigAndExcavate: Combines the functionality of the three previous programs
All of this spanning a whopping 128x128 blocks! (Parameters can be altered to meet your personal requirements)

Features
  • Quickly excavate loads of ores at a time
  • Highly flexible through the use of (optional) command line arguments and a config file
  • Automatic updating (checks for updates each time the world/server is loaded)
  • Automatic dropoff/refueling
  • Can place torches if desired
  • Handles gravel/bedrock/cobblestone generators/players/other turtles
Thanks To
Spoiler

TRAILER:



TUTORIAL:





Posted Image

'Installing' the programs
Spoiler

Parameters
Spoiler

Configuring the programs
Spoiler

Code

Images
Spoiler

Guidelines
  • First try it on a small scale, for example: a tunnel of length 1. This way you are sure that you positioned all the docking stations correctly
  • I will do my best to keep the information above as understandable as possible, should you have any questions: feel free to ask :)


#2 Gamewalker

  • New Members
  • 1 posts

Posted 10 December 2012 - 09:24 PM

Hi, dont get it to work, the turtle starts mining a 3x3x1 tunnel and then it dont go forward.
It digs tunnel length the 3x3x1 and then it go back, is there a missing forward line?
Could you make a short yt video?

#3 Ulthean

  • Members
  • 171 posts

Posted 11 December 2012 - 10:35 AM

View PostGamewalker, on 10 December 2012 - 09:24 PM, said:

Hi, dont get it to work, the turtle starts mining a 3x3x1 tunnel and then it dont go forward.
It digs tunnel length the 3x3x1 and then it go back, is there a missing forward line?

You are completely correct, right before making the post I made some minor changes, and I had an incorrect if-statement.
In any case, the digTunnels pastebin code has been updated and is working now.

#4 Bubba

    Use Code Tags!

  • Moderators
  • 1,142 posts
  • LocationRHIT

Posted 11 December 2012 - 11:28 AM

Looks pretty neat. Can't test it right now as my Java installation is broken (stupid Macs) but the code/pictures look good.

#5 Ulthean

  • Members
  • 171 posts

Posted 11 December 2012 - 04:01 PM

Added a basic video tutorial/showcase.

#6 oktabyte

  • Members
  • 4 posts

Posted 12 December 2012 - 02:37 AM

A small thing I noticed was that my turtle ran into a problem: it got filled and then stuck and I had to look for it. is it possible to make it checkt if it is already full?

#7 Ulthean

  • Members
  • 171 posts

Posted 12 December 2012 - 03:05 AM

View Postoktabyte, on 12 December 2012 - 02:37 AM, said:

A small thing I noticed was that my turtle ran into a problem: it got filled and then stuck and I had to look for it. is it possible to make it checkt if it is already full?

This is possible, though it's a pretty busy week so this may have to wait until next week (maybe sooner).
Do you know why it got stuck? I assume you mean during the 'digOres' execution right?

Currently working on an update, including this

#8 oktabyte

  • Members
  • 4 posts

Posted 12 December 2012 - 04:32 AM

View PostUlthean, on 12 December 2012 - 03:05 AM, said:

View Postoktabyte, on 12 December 2012 - 02:37 AM, said:

A small thing I noticed was that my turtle ran into a problem: it got filled and then stuck and I had to look for it. is it possible to make it checkt if it is already full?

This is possible, though it's a pretty busy week so this may have to wait until next week (maybe sooner).
Do you know why it got stuck? I assume you mean during the 'digOres' execution right?

Currently working on an update, including this
yes, it gave me some weird message, i might be able to look back my recordings of the last few hours and find out which but I guess until i find it you will already have it fixed^^

#9 Ulthean

  • Members
  • 171 posts

Posted 12 December 2012 - 05:00 AM

The pastebin files have been updated, changes include:
  • Automatic return when inventory is full or fuel is low, given adequate fuel (there is a new parameter: refuelTresh) this should increase excavation speed aswell.
  • Digging tunnels with digSidesToo=false is now more efficient.


#10 oktabyte

  • Members
  • 4 posts

Posted 12 December 2012 - 06:59 AM

View PostUlthean, on 12 December 2012 - 05:00 AM, said:

The pastebin files have been updated, changes include:
  • Automatic return when inventory is full or fuel is low, given adequate fuel (there is a new parameter: refuelTresh) this should increase excavation speed aswell.
  • Digging tunnels with digSidesToo=false is now more efficient.
You are awesome!

nothing else you can say about that

#11 Ulthean

  • Members
  • 171 posts

Posted 12 December 2012 - 07:29 AM

View Postoktabyte, on 12 December 2012 - 06:59 AM, said:

You are awesome!

nothing else you can say about that

If you take the time to test the program and give feedback it's only normal for me to listen to what you have to say :)
Should you encounter any difficulties be sure to report them and I will get back to you ASAP

#12 ZekwaldIX

  • New Members
  • 3 posts

Posted 12 December 2012 - 07:19 PM

Hmm, I was about to post a message about how the turtle doesn't line up for the 2nd tunnel and then I noticed that the radius for the inner square had increased by 1 to 5 instead of 4 as the OP states.
Oh, and seeign as I'm not that terribly good at programming could I ask of you to put in some comments describing the functions. Now, the names probobly should be enough but I feel that it would've been nice to have additional comments describing what it's supposed to do, for learning purposes ofc.
I hope it's not too much to ask for and if it is I'll just have to try harder.

#13 Ulthean

  • Members
  • 171 posts

Posted 12 December 2012 - 11:32 PM

View PostZekwaldIX, on 12 December 2012 - 07:19 PM, said:

Hmm, I was about to post a message about how the turtle doesn't line up for the 2nd tunnel and then I noticed that the radius for the inner square had increased by 1 to 5 instead of 4 as the OP states.
Oh, and seeign as I'm not that terribly good at programming could I ask of you to put in some comments describing the functions. Now, the names probobly should be enough but I feel that it would've been nice to have additional comments describing what it's supposed to do, for learning purposes ofc.
I hope it's not too much to ask for and if it is I'll just have to try harder.

You are indeed correct about the radius, I noticed this when making the video and decided to change it (in the OP aswell). Later today I will also put an updated image online, since the last one was wrong.

I will add comments to the files aswell, I'll get back to you once that is done.

#14 ZekwaldIX

  • New Members
  • 3 posts

Posted 13 December 2012 - 01:55 AM

View PostUlthean, on 12 December 2012 - 11:32 PM, said:

You are indeed correct about the radius, I noticed this when making the video and decided to change it (in the OP aswell). Later today I will also put an updated image online, since the last one was wrong.

I will add comments to the files aswell, I'll get back to you once that is done.

That would be most kind of you

#15 Ulthean

  • Members
  • 171 posts

Posted 13 December 2012 - 02:13 AM

Comments have been added to the code and the image has been updated.

Let me now if any parts are still unclear and I will do my best to explain it/update the comments in the code.

#16 kann13

  • New Members
  • 1 posts

Posted 13 December 2012 - 03:44 AM

Thank you so much for this. I am very new to Computercraft and to programming specially LUA. The comments you added, only after a cursory look at them have already cleared up a lot of things for me and will help me learn more about LUA programming.

I have done very minimal testing since I have not had much time to play, I think a nice addition to the code would be a function for torch placement.

#17 Ulthean

  • Members
  • 171 posts

Posted 13 December 2012 - 03:54 AM

View Postkann13, on 13 December 2012 - 03:44 AM, said:

Thank you so much for this. I am very new to Computercraft and to programming specially LUA. The comments you added, only after a cursory look at them have already cleared up a lot of things for me and will help me learn more about LUA programming.

I have done very minimal testing since I have not had much time to play, I think a nice addition to the code would be a function for torch placement.

Thank you for the kind words, should you encounter any parts that aren't clear feel free to ask me.

About the torches, I have thought about it, but so far decided against the addition, the reason for this being that it would take up an extra slot in the 'digOres' turtle.
(since otherwise he would consider the torch a 'special' block and 'excavate it')

#18 tacomental

  • New Members
  • 3 posts

Posted 13 December 2012 - 12:46 PM

I made an account to say the same thing. Your code is very clear and seems quite well formed. Thanks for the boost on figuring this stuff out.

#19 Ulthean

  • Members
  • 171 posts

Posted 13 December 2012 - 09:44 PM

View Posttacomental, on 13 December 2012 - 12:46 PM, said:

I made an account to say the same thing. Your code is very clear and seems quite well formed. Thanks for the boost on figuring this stuff out.

Thank YOU!

#20 SuperBrian

  • New Members
  • 2 posts

Posted 15 December 2012 - 07:21 AM

So I think this is pretty great. Only suggestion: Could you have the turtles drop torches periodically? Maybe pickup from the fuel chest? I'm finding myself spending a lot of time running behind the turtles cleaning up so i dont have creepers ruining my setup.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users