Text Engine (improved? i think?)

About the old topic:

I'm sure some of you might remember this topic:

This topic is now outdated. The
parseAndDraw
block has been completely redone from scratch.

The block is now simple, just, for some odd reason Snap! isn't fast enough to draw text using the
untitled script pic (1)
block. I honestly have no idea why that is.

Oh! I forgot to mention that there are now functions, instead of unreadable data for the parse and draw block. Say like, the letter data block. It's been changed to report this:


instead of this:
untitled script pic (5)
Yes, the old one is smaller, but you couldn't even understand the old one compared to the current one!

I would say that's more readable than the old letter data.

You can get the (currently being developed) blocks here: Snap! Build Your Own Blocks

Commands:

Commands can be called just like how functions are in JavaScript.

Here's how to call a command in text:
commandName(arguments seperated by commas)

Someone please explain this part above better.

There are a total of 11 commands. (and there might be more coming soon!)

  1. moveTo
    • This command accepts 2 arguments.
    • The first argument is the x arg and the second is the y arg.
    • This just moves the sprite without drawing.
  2. lineTo
    • This one is most like the moveTo command except it draws lines.
  3. save_pos
    • This saves the current position and direction in a cache to be loaded later.
  4. restore_pos
    • This loads positions and directions from the cache made by the save_pos command into the sprite.
  5. fill
    • This fills in the space within the current location with the current pen color.
  6. up
    • This raises the pen up.
  7. down
    • This puts the pen down.
  8. setPenRGBTo
    • This command accepts 3 arguments and ONLY three arguments. No less, No more.
    • This sets the pen's color using the RGB color values specified (I assume you know what RGB is)
  9. loadAndRun
    • This command accepts ONLY 1 argument.
    • This loads a script from a given URL that is acceptable to the parse and draw block and runs it.
  10. setPenSizeTo
    • This command accepts ONLY 1 argument.
    • This sets the pen size to the specified size given.
  11. changePenSizeBy
    • This command accepts ONLY 1 argument.
    • This changes the pen size by the given amount.

I think the unreadable text is better, though you can make a font editor. I think that is the best option