
We'll be showing lots of "code samples" on this blog to explore how to achieve different game designs. Some of the program elements work together in subtle ways, so it's nice to have a repository of techniques. Kodu will in fact ship with a decent library of sample code in the form of pre-programmed characters and samples for each of the elements.
The rule here says that whenever you bump into a coin you should grab it.
Since it's our first sample, here's some terminology:
Bumped is a sensor. It senses something in the world so that you can respond to it.
Coin is a filter. It limits the sensor to only sense some of the things in the world. If you left off this filter, you would have a rule that would grab anything it bumped into.
The sensor and the filter work together, so they're the same color (light green.)
You can have many filters in the same rule: for example, bumped - red - coin, etc. We'll get into more of the filters later. You can only have one sensor per rule.
Grab is a verb. Some verbs can be tuned by applying modifiers. For example, if you use the verb move you can also use "quickly" as a modifier. Grab does not have any modifiers.
A bot can only hold one thing at a time. This keeps the language simpler and is enough for most uses. Once you're holding something, you can drop it or give it to another character using the 'drop' and 'give' verbs. A character can also react when you give them something, but that's a sample for another day.

I was at CHI (computer-human interaction) in Boston last week and got to have lunch with some of the people I admire most.
These are the people working on the major children's programming projects. From left to right:
Yoshiki Ohshima - eToys
Caitlin Kelleher (Washington U)- Story-Telling Alice
Mitch Resnick (MIT) - Scratch
Ken Perlin (NYU) - Rapunzel and many other things (heard of Perlin noise?)
Robert Torres - Gamestar Mechanic - and working on a 6-12 game design public high school opening in NYC this September
Getting ready for CHI panel on monday with mitch, scratch, ken, squeak, and much more.
Here's a new screenshot. Talking to some press on the East Coast next week and baked them a fresh batch of screens. Here's the first..
