Posted 22 June 2014 - 05:31 AM
I've created two programs that go perfect together for developing a new area.
1. Clear Space http://pastebin.com/Hipv8pmJ - This clears an entire area given a length, width, height and depth. You can give it a depth of 0 (meaning it will not go down), but everything else must be at least 1.
2. Place Torches http://pastebin.com/3gbNWF3M - This places torches in the "official" most efficient pattern seen here. While this program does dig, it's recommended that you have a large area planned out for it. (Hence the clear space program.) Also, as you can see from the linked screenshot, it does assume a fairly large area. Each torch is placed either 11 blocks or 6 blocks away from the last, depending if you're looking at length or width.
A Challenge: I have to think on this myself, but I want to see if anyone else has suggestions, or if they want to give this a go. I'd like to mix the two programs into one. You give it an area you want to clear, it places torches on the lowest level, and then clears the area above that. The programs handle themselves a little differently and you have to deal with the odd end positioning of the torch program.
Anyway, below is a screen of the results, this is a 36x24 area (the numbers were purposely chosen for an easy test run, but the program does work with funky numbers. Tell me what you think. :)/>
Edit: Planned changes:
[indent=1]1. Implement placeDown() into "Clear Space" to cover up caverns and holes.[/indent]
[indent=1]2. Allow "Place Torches" to work around buildings, ie. if it runs into something, instead of digging, simply move up until it can go forward, and go down where it can. (Best for flat spaces, or with areas that have established buildings.)[/indent]
1. Clear Space http://pastebin.com/Hipv8pmJ - This clears an entire area given a length, width, height and depth. You can give it a depth of 0 (meaning it will not go down), but everything else must be at least 1.
2. Place Torches http://pastebin.com/3gbNWF3M - This places torches in the "official" most efficient pattern seen here. While this program does dig, it's recommended that you have a large area planned out for it. (Hence the clear space program.) Also, as you can see from the linked screenshot, it does assume a fairly large area. Each torch is placed either 11 blocks or 6 blocks away from the last, depending if you're looking at length or width.
A Challenge: I have to think on this myself, but I want to see if anyone else has suggestions, or if they want to give this a go. I'd like to mix the two programs into one. You give it an area you want to clear, it places torches on the lowest level, and then clears the area above that. The programs handle themselves a little differently and you have to deal with the odd end positioning of the torch program.
Anyway, below is a screen of the results, this is a 36x24 area (the numbers were purposely chosen for an easy test run, but the program does work with funky numbers. Tell me what you think. :)/>
Edit: Planned changes:
[indent=1]1. Implement placeDown() into "Clear Space" to cover up caverns and holes.[/indent]
[indent=1]2. Allow "Place Torches" to work around buildings, ie. if it runs into something, instead of digging, simply move up until it can go forward, and go down where it can. (Best for flat spaces, or with areas that have established buildings.)[/indent]