Page 1 of 1

LÖVE Turtle library, like in BASIC languages

Posted: Sat Nov 17, 2012 7:12 pm
by pieguy275
I wrote a small series of functions that can act as a turtle, much like the one in BASIC languages. It has 11 total commands, they are:

turtle(angle, length)

up(length)

down(length)

left(length)

right(length)

downRight(length)

downLeft(length)

upRight(length)

upLeft(length)

setX( xValue)

setY( yValue)


Download
An explanation on what each one does can be found in the file itself, which will have an example included on how to use each command. The example can and source be found here. The library is named turtle.lua, and the example on usage is in the main.lua file.

This was not meant to be used in games, but to be used in fractals. It still can used in games though. Feedback would be appreciated!

Re: LÖVE Turtle library, like in BASIC languages

Posted: Sat Nov 17, 2012 11:15 pm
by Lafolie
A friendly tip: upload your script/.love to the thread using the attachment system and/or check out applications like Bitbucket or Github.

I remember using a hardware version of Turtle programs when I was a kid. I remember toying with a software one too. This is good for learning, though I haven't looked at the source properly.