Kodu is a visual programming language suitable to teach kids the basic of programming and to train their creativity. In today’s lesson, we will build a simple game that we can use as an introduction to Kodu.

The Building Blocks of Kodu

The world of Kodu consist of programmable objects where we can attach a behavioral script into each object that we place on the Kodu landscape.

Kodu’s programming language is a simple icon based programming user interface where the language are broken down into pages and rules.

Kodu has a list of built in behavior that we can attach to an object to make them move around, shoot objects, and perform incredible combat move with one another.

Microsoft Kodu Game Lab has a series of ‘Getting Started’ video that is very useful for beginners to understand the basic of Kodu Programming.

Here is a simple Kodu world that consist of trees and a motorcycle. The motorcycle is programmed to always wander the terrain and it should avoid any tree on its path.

Let’s add more more objects on the landscape and have the motorcycle chase and shoot them.

A wisp is one of the many characters we can create in Kodu.

The wisp will move around a designated path, and Kodu will spawn another wisp when it’s health reaches zero.

Classroom Exercises

To prepare for the lesson instructors need to install Kodu and download our Microsoft Kodu Classroom Kit into Kodu’s import folder: ‘C:\Users[user name]\Documents\SavedGames\Boku\Player1\Imports\’. Kodu will automatically import the game when we load the game from the main menu.

Note: Instructors need to unzip the file to get the Kodu game file

Begin the class by opening the world and ask the students to observe the motorcycle and the wisp behavior. The explanation might be something like ‘the wisp is the enemy’ because the game keep on regenerating the ‘wisp’ when the motorcycle destroys it.

Now open the wisp or the motorcycle program and ask the students to relate the wisp behavior with the code. After the student successfully explain the code, ask volunteers to modify the code for the following set of behaviors.

When appropriate have the students to modify the code for each objects and explain why their solutions does not work.

Add Trees or modify their colour Adjust the wisp’s behaviour so that it produces a coin when the motorcycle destroys the wisp. Program the motorcycle to eat the coin to increase the game score Reverse the role of the wisp and the motorcycle by having the wisp destroying the motorcycle

That’s all there is to it. Enjoy!

Download Microsoft Kodu Classroom Kit

Credit

The author would like to thank Trevor Berkolay for designing a good classroom exercise, Eric Z Goodnight for his relentless effort in testing the game, and The Geek who gave the final editing on the article.