Simple Turtle

Previous topic - Next topic

MrPlow

I was curious to see if I could code a simple Turtle Graphics program

I will develop it further...

Working commands are :

FD ### (forward in pixels)
BK ### (backward in pixels)
LT ###  (Left turn in degrees)
RT ###  (Right turn in degrees)
PU / PD (Pen up / down)
PEN x (color of pen 0 to 7)
REPEAT x (where x is number of loops)
END (close repeat loop)

Type RUN to execute or repeat a list of commands
INSTANT ON = Execute commands immediately
INSTANT OFF = RUN required to run command list

RESET = Clears List and repositions Turtle
CLEAR / CL = Clears commands list

SAVE imagename = save png to documents.

FEATURES
=======
REPEATs can be nested


have fun!

====================



   Create simple programs with commands to control the Turtle and draw amazing images!!


   INSTANT ON / OFF = Turns on / off immediate execution of commands

   FD x = Forward x pixels
   BK x = Backward x pixels

   RT x = Right by x degrees
   LT x = Left by x degrees
   
   PU = Pen Up (Do not draw)
   PD = Pen Down (Draw as normal)

   REPEAT x = Creates a loop to run x times which runs any commands within the loop. Place END when closing loop.

   END = Closes a REPEAT loop. (Loops can be nested)

   PEN x = Color of pen (0 - 7)

   RUN = Runs the current list of commands shown on screen

   CLEAR / CL = Clears the command list

   RESET = Clears commands and resets your Turtle
   
   SAVE filename = Saves a png of the working graphic to your documents folder

   QUIT = Exits the program
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

erico

Is that LOGO? ;)
Will give a try.

erico

I could not make any drawings :(
Probably I have no idea how to work it out, or is there something wrong?

Here an image of one of my attempts

r0ber7

I don't understand what this is. How do I use it? I typed in LT and PD and PEN 1, but don't understand what is Simple Turtle.

MrPlow

oops! Guys Type RUN at the end...left out vital instruction!
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

#5
also INSTANT ON will run a line of commands immediately and INSTANT OFF means you need to do a RUN at the end.

RESET with clear a list.
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

MrPlow

New version added...
Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

Slydog

Great idea for a GLBasic project!
30 years ago, I had so much fun in school with LOGO and commanding that little turtle!
Couldn't draw much more than spirals and flowerish stuff though.

It would be fun to add more commands, such as boxes, circles, or an arc line for curves.
Or be able to draw a pattern, then duplicate that pattern with scale and rotation, etc.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

Ian Price

I thought LOGO was pointless BITD. I still do. But that isn't important - a lot of pursuits are also pointless, but fun.

But a recreation with all it's pointlessness is great.  :D

PS I really think you have to be over a certain age to appreciate your program. Anyone that used a pc rather than a BBC micro at school is too young! :P
I came. I saw. I played.

MrPlow

I actually had it on my Speccy - but also school had Apple iie with it and I recall it on Nimbus 286 PC

:)

I am actually using it to help build a tactics game using commands - logo seemed a good starting point.

New update added :)




Comp:
Speccy-48k, Speccy-128k, Amigas, PCs

erico

It also helps to learn coding a parser, if that is the way MrPlow is going.
I also found this early today:
http://www.glbasic.com/forum/index.php?topic=11003.0
A music player that works out of text files.
I somehow feel they could be related. ;/