Tinylogo

2024-08-06に共有


I was thinking about the current #tweetjam #tweetcart and wanted to do something fun an interactive, and though about a logo interpreter, i've made one then i've started to work on making it the shorter as possible, this is the current size it's about 200 chars, but I'm sure it can be done smaller.

How to use:

Left/Right select the logo command:

FW : Forward
TL : Turn Left
TR : Turn Right

Up/Down select the value for the current command, in degres for the rotation (TL/TR) and in pixel for moving (FW)

The top row is used to display the current command:

"A>CC VV"

where A is the current angle rotation (0 is going to the top, 90 to the right, etc..) CC is the currently selected command, and VV the command value.

To "run" the command BTN 4 (Z) is to be used!

This version is a really small subset of the Logo language, and is not interpreted as logo is of course, without a real keyboard it would be really difficult to do something better..

I will post a longer version that support most of the logo turtle commands but not as a language, only as a direct command mode.

Have fun!

It's not the code in the cart, but I've trimed it a bit, it was 346 chars it's now 314! \o/
But this one ditch the left button so you can only select in order FW → TL → TR → FW → ...

Older code version:

346 chars version: