Logo wrapper in Codea

Robot War! On the Apple II!

Why is it all the COOL stuff (Codea excepted) was 20+ years ago. I know I can’t have changed… :slight_smile:

So long as we have .codea files and global persistent storage, exchanging bots is easy - you make a standard bot skeleton (kinda like Codea is a lua skeleton), and include routines to save/load the bot code, by name, from global storage, kinda like Spritely does for fonts.

If .codea goes away… sigh. Compile/compress it to a cut-and-pasteable string? Yucky.

(This is what I mean by how important sharing is, btw - you can’t robot war yourself. Well, you can, but it’s like 1-man chess…)

I believe @Blanchot mentioned a visual programming language in another thread.

@Andrew mentioned it here

And @Sanit brought logo

When you all mention visual programming, I think programming with some kind of touchable picture based flow chart.

This isn’t modifiable but touch (nor does it have all the logo commands) but here is a thought:

Code: http://ipad41001.posterous.com/logea-02

Picture: http://ipad41001.posterous.com/picture-of-a-flowchart-of-logo-in-codea-lua

I’m not sure how to represent numbers, I attempted to get away from numbers (for parms) by showing the digits place with a number of footprints after it. I can already predict that r,g,b color will be a bit large.

Also traditional logo has the turns in angles. I didn’t change it for this but I think a better representation for turns would be 1/2 for half-turn for 180 degrees, 1/4 for quarter turn for 90 degrees.

(and I was also thinking about codewars :slight_smile: )

Presented an an example of “visual programming”, for inspiration: http://www.teamhassenplug.org/NXT/NXTGTips/

And if you’re running OS X and have the Developer stuff installed, go mess with Quartz Composer, another visual programming environment. I linked to a page with some of the stuff in that in the GLSL conversations in another thread.

The NXT-G stuff is surprisingly like the basic commands for Robot War - move, turn, look, etc. There’s a flash demo on lego’s site that’s worth taking a look at.

My son was in the local chapter of FirstLegoLeague last year. My poor kids, with me constantly pushing the whole of nerdom on them :slight_smile:

Here the idea about UI

The visual commands for square picture

I was thinking a 3 or 6 digit abacus for the numbers…

Anyway, hope this helps

http://ipad41001.posterous.com/logea-03-pic

http://ipad41001.posterous.com/logea-03

I’m a bit too sleepy for the repeat command :slight_smile:

Lego Mindstorms! Yay! Now that would be supercool: controlling a Lego mindstorms robot from an iPad via Codea. If that were possible, I’d vote for sockets in a trice (has Mindstorms evolved from the old IR line-of-sight control?). The original Lego programming system is what I had in mind (of course, as a Linux user then I program my robots in nqc).

How about having different levels of control? The really basic ones have simple blocks to drag-and-drop with a few preset angles (I’d add a few more, maybe 30 and 60, to get more interesting behaviours). Then for the more advanced kids (aka grown-ups) the ability to choose a number. This could be via a number wheel to begin with, and then via a keyboard/keypad. Similarly for the distances.

That way, it would be a tool that someone could use at several development stages.

(My kids are 4,6,8)

The new Lego NXT stuff appears to use bluetooth, not wifi, sad to say for team sockets.

I also used nqc! The first gen visual language lacked things (variables!), so it was largely useless - dunno if they ever corrected that, andthen I didn’t care because nqc did :-). I don’t have the next gen stuff because I’m old, boo hoo.

I was thinking a 3 or 6 digit abacus for the numbers...

Funny, I played around with an abacus yesterday… (Abacus Pro (appstore)) and thought it would be a good exercise to implement my own in Codea.

It seems to me that a 3 digit abacus for number input would be a perfect fit for kids.

On Nxt … Not that it’s a concern, but for competitions, you are limited to making changes via hard line USB or on the Nxt screen itself. Wireless functionality has to be turned off. This is mainly because with 8 to 10 Nxt on a gym floor things would get muddled (also the audience bring their own devices to clog the airwaves). I see an IPhone app in the store, definitely something that could be improved.

On abacus (abacuses? abacusi? :slight_smile: ) … I’m hoping one is readable in a 40 x 40 box which could be enlarged for manipulation.

Never had occasion to do Lego competitions, the closest I got was First Robotics (as a sort of helper for a team, not as a kid. Didn’t have these things in the UK when I was growing up.).

I was just in the audience and only helped move things and tended kids for our team at competition. First Lego Legue, promotes a very polite and friendly kind of competition (unlike some of the behaviors from sports or even dance parents). I didn’t do much on the software other than setting it up, getting a few things to function (finding some custom block for them to use), and guiding (if that works, make a backup, work in layers and pieces). They are very big on the kids doing the real work, not a competition between parents like science fairs seem to have turned into.

There are a couple other visual programming environments worth exploring.

Check out Scratch at http://scratch.mit.edu/ for some ideas on how to handle control structures (One of my beefs with Labview in general and NXT is awkward control structure management.)

There’s also Lightbot as an example of a cool programming game, complete with simple conditionals and recursion: http://armorgames.com/play/6061/light-bot-20