Visual Programming – Scratch


I’ve been interested in visual programming for a while now, as has most of the game industry it seems. People keep looking for a silver bullet to scripting languages. Something without all that nasty syntax that somehow encapsulates all the logic that needs to exist to drive a game, material editor, animation tree, AI, etc.

I caught this link recently: Dr. Dobb’s Journal Article on “Scratch” about a MIT Labs project to make writing code accessible to children. I remember playing around with Alice in college and thinking how interesting it might be if I were younger. Scratch has a couple of interesting innovations. I also remember reading about a Neverwinter Nights visual scripting system called ScriptCards.

One of the more interesting innovations of Scratch is described in this excerpt from the article:

“Scratch blocks are shaped to fit together only in ways that make syntactic sense. Control structures (like forever and repeat) are C-shaped to suggest that blocks should be placed inside them. Blocks that output values are shaped according to the types of values they return: ovals for numbers and hexagons for Booleans. Conditional blocks (like if and repeat-until) have hexagon-shaped voids, indicating a Boolean is required.”

The following video tutorial introduces the basics and highlights the lego-block aspect mentioned above.

In graph-based paradigms, you often end up with spaghetti wiring and a lot of effort is spent making it readable for long-term use. At first blush, the metaphor of the building blocks seems like it does a good job making the script easy to put together and easy to read.

Part of me can’t wait to jump ahead about 7-8 years to try these things out with my daughter. What language you use is irrelevant, its how programming teaches you to break down problems and solve them incrementally that is a life skill that is far more valuable.

I have to say that I imagine that this project had to be wonderfully fulfilling to develop. The Dr. Dobb’s article outlines a scenario where a researcher helped a child add a counter to their scratch program to keep score and got thanked for it. I can completely understand where the kid was coming from. Part of the joy of learning about computers are those “ah-ha” moments when you learn a new concept and it helps break down all sorts of barrirers for you. That epiphany is pure joy and is incredibly addictive. Even better was later discussion of people forming virtual “companies” where everyone had a specialty and they could combine forces to make even more interesting and complex programs. A little microcosm of the games industry itself in teenage form. What a great thing to be teaching kids!

So I started off talking about visual programming and switched gears into talking about how cool an educational tool this is. Anyway, do yourself a favor and read this article to remind yourself why you fell in love with programming in the first place.

Advertisements

~ by shaunkime on December 29, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: