Jump to content

Shortcake: A rapid prototyping language for turtles [Beta]

turtle utility lua

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

#1 metamilo

  • New Members
  • 1 posts

Posted 04 July 2017 - 02:13 PM

What is it?

Shortcake is a program that uses a system of single character commands to control mining turtles. The shorthand code is run through an interpreter that turns it into normal turtle code, allowing you to quickly write mining programs.

For example, you can write a fully adjustable branch mining program in just 22 characters:

It looks complicated, is it worth my time?

I'm a bit biased but I would say yes, but I can explain most of it in a paragraph or two, so stick around and judge for yourself.

Here's a ~10min tutorial that covers the basics

Create a new shortcake program like this
shortcake new <program_name>
Then edit it like you would a normal program
edit <program_name>

You'll see it already has some code in it. This is for running it through the interpreter, your code goes in the comment on the first line.

The Basics

x = break and move forward
^ = break and move up
v = break and move down
< = turn left
> = turn right

f = break Forward
u = break Up
d = break Down

c = place Center
a = place Above
b = place Below

s = Suck up items
r = Refuel from current slot
y = cYcle current slot
p = droP from current slot

You can repeat commands by following them with a number

You can repeat groups of commands by grouping them with parenthesis and following the group with a number

You can combine and nest these as deep as you want

Parameter References
You can reference program parameters by using upper case letters where A is the first and Z is the 26th. So if I called my program like this:
myProgram 3 5 2
All the A's would be replaced with 3's, B's with 5's, and C's with 2's

Expressions are just bits of code delimited by square brackets [] that get evaluated during interpretation. So if we had this program called:
myProgram 3 5 2
Then [B-1] would be 4

Flags are commands that toggle the way other commands are interpreted

The ' flag changes the x command to dig up as well as forward. Similarly the , command changes x to dig down as well as forward.

And that's it!
Now this branch mine should be understandable



installer: AyRdWn84
shortcake: xerNNRAH (main program)
config: DSreWan8
t: FFwyiJrH (just a basic api)


Learn More

You can find more details about this program on my site:

This is version is basically complete, but If you want to help, I need people to test for bugs and usability. Also, I have a newer version in the works and I am taking suggestions.

Edited by metamilo, 05 July 2017 - 03:25 AM.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users