Sinisterly
[VB.Net] LOGO Basic v1.0 - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Visual Basic & .NET Framework (https://sinister.ly/Forum-Visual-Basic-NET-Framework)
+--- Thread: [VB.Net] LOGO Basic v1.0 (/Thread-VB-Net-LOGO-Basic-v1-0)



[VB.Net] LOGO Basic v1.0 - Coder-san - 05-23-2011

LOGO Basic v1.0

[altimg=http://i.imgur.com/AzHMw.jpg]LOGO Basic - By Coder-san[/altimg]

I've been working on this since yesterday. Just for the sake of doing something new.
LOGO Basic is a [link=http://en.wikipedia.org/wiki/Logo_%28programming_language%29]LOGO[/link] like language. But only the Turtle Graphics part. Hence the Basic.
I've currently added some important commands in this. Smile

Current command list:
  • UP - Draws line till distance mentioned
  • DOWN - ""
  • LEFT - ""
  • RIGHT - ""
  • PEN -To change pen color
  • MOVE - Draws line till exact point location
  • PU - Pen up
  • PD - Pen down
  • LOAD - Load codes
  • SAVE - Save codes
  • RESET - Reset file
  • CAPTURE - Exports working area to JPEG
  • EXIT - Close LOGO Basic
  • WALK - Draws line till distance mentioned
  • LOOP - Loop

Syntax:
  • UP 100
  • DOWN 100
  • LEFT 100
  • RIGHT 100
  • PEN Red
  • MOVE 100 100
  • PU
  • PD
  • LOAD file.txt
  • SAVE file.txt
  • RESET
  • CAPTURE image.jpg
  • EXIT
  • WALK 100 100
  • LOOP 10 (RIGHT 20;DOWN 20)

Codes to draw "HC":

Code:
right 40 down 80 right 60 up 80 right 40 down 200 left 40 up 80 left 60 down 80 left 40 up 200 pu right 140 right 50 pen white pd right 140 down 40 left 100 down 120 right 100 down 40 left 140 up 200 capture hc.jpg

Known limitations:

Currently LOGO Basic does not save color info to files, and draws the whole file in the current Turtle color.

[link=http://www.multiupload.com/0L698ZV9XU][altimg=http://c.imagehost.org/0663/Download.png]LOGO Basic.exe[/altimg]
LOGO Basic.exe (72 KB)[/link]

I hope you like it. Smile


RE: [VB.Net] LOGO Basic v1.0 - 1234hotmaster - 05-23-2011

this was exactly the thing my teacher said is needed to pass the term!! whoo tnx coder your a lifeeee saverrrrrrrrrrrrrrrrrrrrr :thumbs:


RE: [VB.Net] LOGO Basic v1.0 - Wicked - 05-23-2011

this looks pretty cool man good job Smile


RE: [VB.Net] LOGO Basic v1.0 - Coder-san - 05-23-2011

Glad you like it. Smile
I think it came out pretty well. It's not much complex, just .LastIndexOf(" ") to read the data after command, and stuff.


RE: [VB.Net] LOGO Basic v1.0 - 1234hotmaster - 05-23-2011

hey maybe you can add a function to be able to draw the lines via arrows in the next version Biggrin


RE: [VB.Net] LOGO Basic v1.0 - Coder-san - 05-23-2011

What do you mean?


RE: [VB.Net] LOGO Basic v1.0 - 1234hotmaster - 05-23-2011

(05-23-2011, 12:53 PM)Coder-san Wrote: What do you mean?

if you press the right arrow it will draw right for 10 points. if the up one it will draw up 10. thats all Smile


RE: [VB.Net] LOGO Basic v1.0 - Coder-san - 05-23-2011

Got Loop working. Biggrin

Code:
LOOP 10(right 20;down 20)

[altimg=http://i.imgur.com/BZKLh.png]Loop in LOGO Basic[/altimg]

(05-23-2011, 02:34 PM)1234hotmaster Wrote:
(05-23-2011, 12:53 PM)Coder-san Wrote: What do you mean?

if you press the right arrow it will draw right for 10 points. if the up one it will draw up 10. thats all Smile

Nah, that kinda ruins it.


RE: [VB.Net] LOGO Basic v1.0 - Coder-san - 05-23-2011

Link updated with two new functions (LOOP and WALK) and a cleaner code. Now Turtle will show you if Pen is UP or DOWN too.
Currently Loop inside loop is not allowed, I'm trying to figure out a way.