Jump to content




Do - The ultimate turtle usage program

turtle

  • You cannot reply to this topic
6 replies to this topic

#1 jerimo

  • Members
  • 74 posts

Posted 07 March 2015 - 02:04 PM

Ever wished you could simply write the following into a turtle, and it would just... work?
do forward 3 ( mineshaft forward 3 ) 5 turnLeft 2 forward 18 drop
this sample would go forward 3 blocks, then dig five mineshafts to bedrock 3 blocks apart from each other, turn around, go back to where it started and drop all it's contents in front of it at your feet.

Of even this?
do set HouseBuilder forward ( set BuildUp up ( set BuildCorner ( set BuildWall placeDown forward ) 4 placeDown turnRight ) 4 ) 3 turnRight forward turnLeft ( set BuildRoof ( placeDown forward ) 4 turnRight forward turnRight ( placeDown forward ) 4 turnLeft forward turnLeft ( placeDown forward ) 4 turnLeft forward 3 turnLeft forward 5 down 3 )
to build a 5 * 5 house ahead and to the right of where the turtle currently is, then head back to where it used to be?

You use your turtles a lot and wish to know what they are currently up to?
Just name the programs and you can know which step it currently is at.
To see just how powerful this new feature is, lets see exactly how your scripts need to be altered, using the above example!
do set Placement forward 3 ( set Mining mineshaft forward 3 ) 5 turnLeft 2 forward 18 drop
While this code is running, the turtle would declare that it is in the "Placement" phase while not in the inner program, and mention that it is currently mining when in the sub-program.

Everything is made simple for you, just type in do and it will do any turtle command or run any program on the turtles internal memory! It works with the turtle API straight out of the box, but best of all, integrating it with your own api takes a few seconds; simply go to line 120 and add in the location of your API in quotation marks and you are done! (Ex: "rom/apis/turtle/turtle" )

Guide
Spoiler

Changelog
Spoiler

If there are any questions please do bring them up, I'd be glad to help out

V0.2 - PasteBin - 1dUgMiH6

Obsoleted Versions:
Spoiler

Edited by jerimo, 10 March 2015 - 03:22 PM.


#2 jerimo

  • Members
  • 74 posts

Posted 08 March 2015 - 12:31 AM

Planned features:
- exposed variables within the program itself, such as being able to know the loop count and such.
-custom variables in code, will likely be naturally implemented at the same time as exposing variables already in use
- flow tools, like if and while
- possibility to pass in arguments to programs run
- multiple APIs!

If you have any feature requests please do mention them!

Unstable build, used for development. Feel free to test it out and give feedback/bugs; Would be extremely useful actually! ;)
Unstable version: sCZjMM5h

Extra features:
- Multiple API load is working now

Next feature:
- Variables

Edited by jerimo, 10 March 2015 - 07:41 PM.


#3 Chaos_Therum

  • Members
  • 5 posts

Posted 09 March 2015 - 08:29 AM

View Postjerimo, on 07 March 2015 - 02:04 PM, said:

Ever wished you could simply write the following into a turtle, and it would just... work?
do forward 3 ( mineshaft forward 3 ) 5 turnLeft 2 forward 18 drop
this sample would go forward 3 blocks, then dig five mineshafts to bedrock 3 blocks apart from each other, turn around, go back to where it started and drop all it's contents in front of it at your feet.

Everything is made simple for you, just type in do and it will do any turtle command or run any program on the turtles internal memory!
And best of all, integrating it with your own api takes under a minute; simply load your API at the begining of the program, and change the two references to turtle in the code, and you are done!

Guide
Spoiler

It's a short post, but shouldn't that just prove how easy to it to use?

If there are any questions please do bring them up, I'd be glad to help out

PasteBin: vM0qBB7R

This looks pretty promising.

#4 jerimo

  • Members
  • 74 posts

Posted 10 March 2015 - 03:03 AM

View PostChaos_Therum, on 09 March 2015 - 08:29 AM, said:

View Postjerimo, on 07 March 2015 - 02:04 PM, said:

-- Original Post --

This looks pretty promising.
Thanks! Reworking it so that it can more easily be used in other programs as well as fully functional parentheses (found a bug in them in the previous version)
Hoping that the new version will be up tonight, worked a lot on it today.

The next step will be allowing multiple API checks!

#5 jerimo

  • Members
  • 74 posts

Posted 10 March 2015 - 05:57 AM

New version posted, see the OP for details.
Also a much needed expansion of the post to show off some of the features and how to use it in the command line as well as in programs

#6 jerimo

  • Members
  • 74 posts

Posted 10 March 2015 - 07:37 PM

Added the unstable build link in the second post, added features, and should work fine, but haven't run the code yet

#7 jerimo

  • Members
  • 74 posts

Posted 15 March 2015 - 03:14 PM

Has anyone tried it yet?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users