Shop OBEX P1 Docs P2 Docs Learn Events
Hydra Logo 1.41 now available for download! — Parallax Forums

Hydra Logo 1.41 now available for download!

DreamwriterDreamwriter Posts: 22
edited 2007-04-17 05:05 in Propeller 1
Hydra Logo is now ready for human consumption! With this programming language you can draw neat things and stuff without using any sort of compiler/editor, just type commands and watch them happen. Here's a fun program you can type to get you started:

to spiral :ln
fd :ln
rt 92
fd :ln+1
rt 92
spiral :ln+2
end

Then just enter
spiral 4

and watch the fun!

JMM_logo_04-16-07.zip

Post Edited (Dreamwriter) : 4/17/2007 5:10:14 AM GMT

Comments

  • Jasper_MJasper_M Posts: 222
    edited 2007-03-20 08:40
    Nice work! I've been playing with that for sometime now... but why do so few commands work inside repeat? For instance, repeat 4[noparse][[/noparse]pendown] causes an unstoppable flood of "Huh? I don't understand" messages... Or have I misunderstood something? I've never programmed in Logo before... Anyway, keep up the good work ^________^
  • DreamwriterDreamwriter Posts: 22
    edited 2007-03-20 08:56
    Doh! I only put in the messages tonight (last couple hours), a bug must have slipped in. I've done a few other repeat commands and they worked, dunno what's up - it appears that any built-in command without parameters causes the issue. So a workaround until I get it fixed would be to create your own command that does the same thing:

    to writedown
    pendown
    end
  • Jasper_MJasper_M Posts: 222
    edited 2007-03-20 09:00
    Yes, I figured that out already. Also, print won't work in a repeat - repeat 4[noparse][[/noparse]print agaga ] prints "agaga ]" and then "Huh I don't understand" again and again... It seems that the print reads whole line as its parameter or something ...
  • DreamwriterDreamwriter Posts: 22
    edited 2007-03-20 09:18
    Yeah, print was just a real quick last-second throwin, I figured since I had just made a function to write error messages, might as well let users use it too and have their "Hello World". That's exactly what it does right now, the entire line just gets printed to the screen
  • AndreLAndreL Posts: 1,004
    edited 2007-03-20 20:00
    Will you have these bugs fixed this week?

    Andre'
  • DreamwriterDreamwriter Posts: 22
    edited 2007-03-20 22:22
    Oh yeah, those two bugs are simple fixes. I'll be making a new release on Friday, that'll be a more "solid" build
  • AndreLAndreL Posts: 1,004
    edited 2007-03-21 04:05
    Good, people get frustrated really quick. Remember, when making anything for public consumption, it just has to work.

    Andre'
  • DreamwriterDreamwriter Posts: 22
    edited 2007-03-26 10:35
    Alright, here's Hydra Logo 1.2 (first message in the thread)! Took a little longer than I estimated, but the couple days was worth it. First off I fixed a TON of bugs - ones with Repeat, ones with just basic running of commands, ones with error messages. Second, if you call a new function from the last line of the previous function (usually tail-end recursion), no new stack space is needed - this means there is no limit to recursion if the last line is where it happens (that spiral demo up above can now get a whole lot bigger). The "end" command no longer counts as one of the 15 lines a function can use. I added the ability to "cancel" a function while you are creating it (in case you make a nasty typo). I added a "stop" command, which stops the current function from running (and returns to the caller if there is one). And I added "turbo mode" - streaming functions off of EEPROM, while cool, is dog-slow. So now, one function at a time can be set to "turbo mode", where it automatically comes from system RAM instead. By default, everytime you add a new function, that one automatically gets Turbo Mode, but you can set it yourself with the "setturbo" command (after you use that the system stops automatically setting new things to turbo).

    Here's a fun new command to demo Hydra Logo, that couldn't run in 1.0 (for many reasons), a classic: a fractal tree

    to tree :size
    if :size < 5
    {
    stop
    }
    forward :size
    right 30
    tree :size-5
    left 60
    tree :size-5
    right 30
    backward :size
  • AndreLAndreL Posts: 1,004
    edited 2007-03-26 21:11
    Dreamwriter, post a few cool screen shots, that will catch people's eyes and get them to dl it !

    Andre'
  • DreamwriterDreamwriter Posts: 22
    edited 2007-03-31 07:44
    Version 1.4 on deck! This one's a lot more stable, will look good on more people's TV's (sorry, my TV has no overscan, didn't even think about it before), and has more features, like NES gamepad support. And it includes a special build with a couple built-in demos if you want to see what it can do without a lot of typing.

    Hydra14Demo.jpg

    Full list of changes from 1.2:

    1.4 Turtle can go off edges of screen without causing bugs
    Other miscellaneous bug fixes
    Added support for NES gamepads (ifpad1, ifpad2)
    If commands can now run commands on same line as if statement
    If command brackets are now the nomal [noparse][[/noparse] ]
    EEPROM is now autoloaded upon restart, removed load command
    Moved text area up to avoid overscan (added commands to go back)
    Added "_demo" version with demo autoloader
    Optimized/organized code for user-created commands

    Post Edited (Dreamwriter) : 4/17/2007 4:59:23 AM GMT
  • Ym2413aYm2413a Posts: 630
    edited 2007-04-03 02:02
    (aw) it makes pretty patterns : )
    Sooo Pretty...
  • DreamwriterDreamwriter Posts: 22
    edited 2007-04-03 06:16
    Heh - well, Hydra Logo version 2 will be much more than just pretty pictures [noparse]:)[/noparse] This first one was a big experiment, a warm-up if you will... What I used to get used to the Hydra, Propeller, and EEPROM, and see what was involved in getting a working Logo out there, as well as see what stuff works well and what doesn't. Unfortunately, I've reached limitations - at this point, adding more features to version 1 means removing other features (which is why there's a separate demo build of 1.4 from the real thing). And I think I've gotten it to the point that I'm happy that I've got a pretty good port of the classic Logo people remember from school, minus all the string/table support.

    Hydra Logo Version 2 will be a complete overhaul, a full-fledged game-making language - no more drawing lines, there will be multiple turtles, each one a self-controlled game sprite (but still with easy to understand logo commands and syntax). Much better sound support, speed will be a LOT better. And I'm gonna be doing much of it in assembly, to max out speed/storage and really use the Propeller as a true multicore device.
  • DreamwriterDreamwriter Posts: 22
    edited 2007-04-17 05:05
    Welcome to Hydra Logo 1.41 - Boneheaded Edition! A couple days ago I was playing around with my trusty old Logo and found a nasty bug - one user-created command repeating another one had problems. For example,

    to box
    rp 4[noparse][[/noparse]fd 20 rt 90]
    end

    to boxpat
    rp 8[noparse][[/noparse]box rt 360/8]
    end

    boxpat wouldn't work. After a lot of searching, I found the culpret: a missing return from an important function! Specifically, funcCopyBufferToText, which copies a line of code loaded into the EEPROM buffer onto the current text line for interpeting. It's supposed to return the length of that line, but wasn't. So, half a month after 1.4 we get 1.41, which only fixes my boneheaded mistake (and removes the demo version). Enjoy!
Sign In or Register to comment.