Jump to content




The versatile Shape Builder (updated 05/08/14 - now with diagonal lines)

turtle utility

143 replies to this topic

#21 lalophobia

  • New Members
  • 2 posts

Posted 08 April 2013 - 08:32 AM

cool program
Just a heads up. I'm pretty sure a relatively famous youtuber recently used your script, but it seems like he found a way older version of it



left a similar comment there to use this url instead of the pastebin link. but felt like saying it here as well :)

#22 firerebel

  • Members
  • 7 posts

Posted 10 April 2013 - 09:14 AM

I want the resume build so bad haha. I play on a server that restarts freakin constantly and I want to build a huge sphere :)

#23 CupricWolf

  • Members
  • 86 posts
  • LocationColorado, USA

Posted 12 April 2013 - 11:55 AM

Its still kinda beta, but if you go to the GitHub repo, all of the most recent features are there. It will sometimes start one position off, and might be disabled.
EDIT: It is disabled in my fork. To re-enable go to ContinueQuery() on line 882, delete the first line of the function (return false), and then uncoment the rest of the function. :)

On Another note:
I've added in Hexagons, and Octagons, and prisms with those as bases. I've also added in tentative command line access. :)

#24 CupricWolf

  • Members
  • 86 posts
  • LocationColorado, USA

Posted 12 April 2013 - 12:24 PM

View PostKravyn, on 29 March 2013 - 04:58 AM, said:

Well resuming any code is a pain and most of the time it requires GPS and a saved file or just saved file recording the last position in the code it ran and the variables + or - it was on within the code. But as said below I am still learning lua.

All I was asking really was if there was a way to make the turtle fill in the information for me. like a write command or a io.read("*a") then trigger a write()? things like that to fill in the information.

I understand you want to get the code out first but by the time I get the code I might be finished building my project manually. Which is a long time from now my point is that I just wanted a quick fix or work around.

I am grateful people are working on this code it seems to be really handy. I am learning turtle lua as fast as I can but every time I spend on it the less time I spend on building. and being on a server I fall behind everyone else. heh

I've added command line access to my fork on github, and it will be in the main branch soon :). On pastebin in the meantime at EPwMT1ug. Please note that paste is not the official stable release, and is also beta, some bugs may exist (so post about them here or on github if you find one).

#25 wakafanykai123

  • Members
  • 21 posts

Posted 13 April 2013 - 05:46 AM

This is amazing, worked perfectly for my FTB base :)

#26 CupricWolf

  • Members
  • 86 posts
  • LocationColorado, USA

Posted 14 April 2013 - 09:38 AM

View Postwakafanykai123, on 13 April 2013 - 05:46 AM, said:

This is amazing, worked perfectly for my FTB base :)
Thats good to hear, thanks for sharing! :)

#27 wakafanykai123

  • Members
  • 21 posts

Posted 16 April 2013 - 02:35 PM

View Posthappydude11209, on 14 April 2013 - 09:38 AM, said:

View Postwakafanykai123, on 13 April 2013 - 05:46 AM, said:

This is amazing, worked perfectly for my FTB base :)
Thats good to hear, thanks for sharing! :)
I used it to dig out a wall, while replacing it with blocks. Now i dont need to break every single block in the wall, i can just place a turtle. Btw, you need to place it one behind, it does not start where it stands, this is intended right?

#28 CupricWolf

  • Members
  • 86 posts
  • LocationColorado, USA

Posted 17 April 2013 - 03:07 PM

I didn't author the wall script, but I would Imagine it might be. I'll check the code.... After checking the code it seems that it should start right where it is started and go up/forward from there, it doesn't seem intended.

#29 Keridos

  • Members
  • 75 posts

Posted 20 April 2013 - 02:50 AM

I should have fixed the wall code at some point because the original code was quite derping around much, building the wall in a rather strange way.
Havent checked on the newest version yet but i guess it builds to the front and upwards from its starting point atm.

The new version is up now, prisms added and the command line interface is added, if you find any bugs, just report here or on github.

#30 Steven McWayne

  • Members
  • 7 posts

Posted 20 April 2013 - 07:31 AM

View Postkirimato, on 27 March 2013 - 01:23 PM, said:

I think that he means is that the 20x20 platform building is still bugged. When the turtle is building, he has slot 1 and 2 filled with dirt. When slot 1 runs out of dirt, it picks up cobble and uses the cobble while it doesnt touch the slot 2 filled with dirt.

Same issue with Cuboids, it empties slot 1 then use whatever he just picks up. :/

#31 Keridos

  • Members
  • 75 posts

Posted 21 April 2013 - 06:02 AM

View PostSteven McWayne, on 20 April 2013 - 07:31 AM, said:

View Postkirimato, on 27 March 2013 - 01:23 PM, said:

I think that he means is that the 20x20 platform building is still bugged. When the turtle is building, he has slot 1 and 2 filled with dirt. When slot 1 runs out of dirt, it picks up cobble and uses the cobble while it doesnt touch the slot 2 filled with dirt.

Same issue with Cuboids, it empties slot 1 then use whatever he just picks up. :/

Fixed in the latest release. Turtle now leaves 1 Block in each slot and compares the slot it uses to the first slot. If the items do not match, the item from the selected block is dropped and the turtle continues to look for the correct material.

#32 steelblueskies

  • New Members
  • 1 posts

Posted 22 April 2013 - 06:21 AM

hm. too bad i didn't see this updated post earlier. have been using earlier versions of this, and the works it incorporates for a while.

wouldn't a diamond builder have been a better place to start before the hexagon, (ie 45 degree rotation of the square pattern about the central axis). once that'd been done an octagon could have been a diamond with the points skipped more or less.

would have also nicely served as a basis for a diamond pyramid.

ie diamond
ooxoo
oxoxo
xooox
oxoxo
ooxoo

vs square
xxxxx
xooox
xooox
xooox
xxxxx

but then it might be a bit of a pain with the new bounding box start position method being used. proper diamond style pyramids are about twice as big a pain in the hind end to make by hand, especially hollow. no blocks touching any others ever >.> .

for large structures in built up regions i'm finding i need the old sphere and dome builder instead of this to avoid blowing holes in things just to give the turtle his lead space he will never build in from the bounding box corner, when starting say a large dome.
edit: this sounds harsh. what i meant was the ability to switch between starting in the center point and the corner outside for say a dome is extremely useful. sometimes you are building a dome from the ground around a cluster of structures and going from the center won't work, so this version is handy. the other times you are doming over some things in the midst of others or have nice even roadways in the inside region to be domed, which makes the other older version handy, even if it must be babysat to a greater degree. end edit.

that aside it is a handy and useful compilation, and the possibility of self resume support should be an excellent addition, thank you for all the work.

#33 Steven McWayne

  • Members
  • 7 posts

Posted 22 April 2013 - 07:00 AM

View PostKeridos, on 21 April 2013 - 06:02 AM, said:

View PostSteven McWayne, on 20 April 2013 - 07:31 AM, said:

View Postkirimato, on 27 March 2013 - 01:23 PM, said:

I think that he means is that the 20x20 platform building is still bugged. When the turtle is building, he has slot 1 and 2 filled with dirt. When slot 1 runs out of dirt, it picks up cobble and uses the cobble while it doesnt touch the slot 2 filled with dirt.

Same issue with Cuboids, it empties slot 1 then use whatever he just picks up. :/

Fixed in the latest release. Turtle now leaves 1 Block in each slot and compares the slot it uses to the first slot. If the items do not match, the item from the selected block is dropped and the turtle continues to look for the correct material.
Porno, thx for effort :P

#34 Alexi320

  • New Members
  • 1 posts

Posted 24 April 2013 - 04:08 AM

Handy program, but please add a "Filled Cube/Rectangular Prism" option! Thanks!

#35 Niseg

  • Members
  • 33 posts

Posted 24 April 2013 - 05:31 AM

I took a peek at the code and In my opinion there is a way to optimize the placement. I bet everything worked fine by itself but by separating the part of the program that figure out where to place the block and the part that actually places the block should give a significant improvement in performance.

I've made a similar program that build rectangular room and it's fairly fast despite the same inefficiency issues . If the same method is applied to my program it would be faster. My program place 3 blocks at a time when building a wall which saves fuel . I measured its runtime about 8.5 minutes for building a 12x12 tank which is 0.7s per block. I still have a very inefficient floor/roof builder which places 1 block at a time.

The idea is to first calculate the stracture and put where blocks need to be placed in a 3d array . this can be done your program by "simulating " and instead of placing setting values in the arrray . afterwards there need to be a pathing algorithm which try to minimize move distance .

I think my suggestion might be too complicated to implement .

I noticed that command line parameters would allow you to make more complicated shapes using programs that use "shell.run(). I'll still need to try it myself but according to the video the wall building seem to have a nasty overhead because the program doesn't look past the next block it has to place. if you use an x,y plane oriented building you can keep the turtle free while building more blocks and having less overhead .

#36 Keridos

  • Members
  • 75 posts

Posted 24 April 2013 - 08:14 AM

Niseg, since you the project is opensource you can add those optimizations in even yourself :)
We even have a suggestion on the github mentioning even exactly that optimization. We figured that the turtles VRam might be not big enough for this, pruby (the guy who did the sphere and circle code) even mentioned that somewhere either in his thread or in his code.

View PostAlexi320, on 24 April 2013 - 04:08 AM, said:

Handy program, but please add a "Filled Cube/Rectangular Prism" option! Thanks!
I will add that in in the next few days. (already added now, see edit)
Rectangular Prism are in, called "cuboids" in the program, now even hollow and nonhollow.

/edit (1:36, 24/04/13): Added nonhollow cuboids and fixed wide/deep being switched.

#37 CupricWolf

  • Members
  • 86 posts
  • LocationColorado, USA

Posted 24 April 2013 - 01:05 PM

View PostNiseg, on 24 April 2013 - 05:31 AM, said:

I noticed that command line parameters would allow you to make more complicated shapes using programs that use "shell.run().
Thats why I added the command line stuff :P

#38 Kravyn

  • Members
  • 18 posts

Posted 30 April 2013 - 08:19 PM

Im attempting to build with the cylinder code and it first moves away from me then starts building I did cylinder 9 radius 2 high

What I wanted was a tube that was 9 wide and 2 high for testing purposes and it just does not work where I place it
it moved like 9+ blocks from where I placed it and then starts to build and then builds the wrong location

are you going to be adding the room code back in? that was the one I was really wanting
I am having to use the old code for that again because you have changed the pastebin and removed the room code

edit -- ok well I used the cuboid code and it works good now I am trying to figure out how to use the repeat code setup

codename square -z 13 square -z 15

could you make a square code that could start at one size lets say the starting size is 11 and ends at 30 if set because what if your in the air its not like its that simple to get to the corner you want but if you have a center point it could build out in a spiral from the starting point to the end point

#39 Keridos

  • Members
  • 75 posts

Posted 02 May 2013 - 06:33 PM

View PostKravyn, on 30 April 2013 - 08:19 PM, said:

Im attempting to build with the cylinder code and it first moves away from me then starts building I did cylinder 9 radius 2 high

What I wanted was a tube that was 9 wide and 2 high for testing purposes and it just does not work where I place it
it moved like 9+ blocks from where I placed it and then starts to build and then builds the wrong location

are you going to be adding the room code back in? that was the one I was really wanting
I am having to use the old code for that again because you have changed the pastebin and removed the room code

edit -- ok well I used the cuboid code and it works good now I am trying to figure out how to use the repeat code setup

codename square -z 13 square -z 15

could you make a square code that could start at one size lets say the starting size is 11 and ends at 30 if set because what if your in the air its not like its that simple to get to the corner you want but if you have a center point it could build out in a spiral from the starting point to the end point

We are adding in the ability to select that the starting point of the turtle is the center of the build (for uneven sidelenghts only). Actually it is not hard to calculate where the turtle is starting. Imagine you draw a square around what you try to build. The turtle is in the bottom left corner of that square (when seen from above) when it starts the build.

#40 Kravyn

  • Members
  • 18 posts

Posted 03 May 2013 - 12:32 AM

yeah got it working just not repeatable but is there a way to repeat the square command like I posted?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users