Wednesday, April 6, 2011

My first game with Kodu!

Today I played "Kodu". I made a game that was very fun! You would have to collect ten apples to win, and there was a fish that was worth 5 points.

First I hade to put a "Kodu" in the world, then program him/her to move around under my control, and also to eat apples. Then I added characters and objects, and programed them to eat each other, an the last one "alive" won.

Then Daddy and I played the game I made, against a computer ran character. We ended up winning, because the "cycle" kept going around in cicles until someone bumped it.

Dad's Take:
We've been tech busy in the past few weeks, but mainly playing games. I think I mentioned before that Gidget is participating in a "Girl Games" study being conducted by a friend at Gonzaga U. That's been fun, playing Nancy Drew, etc.

This is Spring break week so we decided to do some more programming. This time with MS Kodu, an icon-based programming interface. Really pretty cute. You click to add pre-made characters to the "world" then use the iconic programming to make them interact with the environment and other characters. You choose a "when" and when that state is met a "Do" is invoked. Here is a sample screen shot of the programming interface:

Using this model, Gidget was able to program a competative apple eating game. She created 3 characters, one controlled by each of us and an NPC. The objective was to see which character could eat 10 apples first. She even programmed the game to keep track of the score and announce a "Winner" when a character reached 10 apples. Here is the screen shot of an early iteration of the game:

Overall, this is a fantastic interface and she likes this programming much more than Python. Can't say that I blame her. While the feedback is nearly instantaneous in both cases, in Kodu, it is visual rather than text-based and you can create a complete game in a very short amount of time.

In terms of this being a literacy exercize, she was gaining a fundamental understanding of "if/then" statements, the core of actual programming. She's learning about interactivity by creating it. Most importantly, the tool itself is allowing her to be creative. It is not a paradigm-changing creativity, as there is no room to move beyond the pre-programmed constraints of the interface, but she is using the tools available to express herself in a fairly impressive way.

I'll post more on this as we move forward.


Monday, January 17, 2011

Gidget's Gadget Blog - Entry #1

Today I learned to program Python! I learned that computers are very picky, because when I forgot " the computer said ERROR! I also learned that you type a math problem like16/2 the computer would give the answer 8.  I learned computer math symbols, *is the multiplication sign, - is minus, + is plus, and /is the division  sign.

I also learned if I typed print " now what I type in here, the computer types back." (after I press enter)

One of the things I did was add a math problem in with a sentence, and the computer would solve the problem and put  the answer in the  sentence.  For example, print "five times two equals" 5*2 -  the computer would write five times two equals 10 5*2= 10.

Here is one of the programs I wrote:                                                                                             #variables demonstrated
print "This program is a demo of variables"
v = 1
print "The value of v is now", v
v = v + 1
print "v now equals itself plus one, making it worth", v
v = 51
print "v can store any number to be used elsewhere."
print "for example, in a sentence. v is now worth", v
print "v times 5 equals", v*5
print "but v still remains only", v
print "to make v five times bigger, you would have to type v = v* 5"
v = v * 5
print "there you go, now v equals", v, "and not", v / 5

Dad's Take:
So we finally started working through the basics of Python together today. I had us follow an online tutorial (, which was a little tedious for her, since I made her type everything rather than copy/paste as it suggested. But I think that a significant part of learning this is in repetition. If Gidget keeps typing "print "blah, blah, blah"" over and over again, she will eventually remember the pattern for making the program print something. Same with the syntax for programming the computer to do math problems. She needs the repetition of  seeing that *=multiplication and / = division, to get in the habit of using those.

I find that this type of repetition is particularly useful when you are talking about programming, which is so picky about requiring that things be entered exactly in order to work. Overall, she did an excellent job and was very excited about the two programs she wrote. The first was a simple print program which made the computer output Mary had a little lamb. The second was the more complicated variable program above that incorporated print commands with variables and math problems. She wanted to keep both and has them on her desktop still.

More programming to come at a later date. But we finally got started with the blog.
Thanks to MLK day for giving us the time to sit down and work through this.