posted this 19 February 2016
Unfortunately we seem to have lost the levels associated with the lessons. This is something we need to fix on our end. I’ve recreated a couple of the levels. These is definitely
from an older version of Kodu. Reading through the first lesson there are some things that will no longer work as described. In particular the lesson alludes to the fact that Kodu can’t see what is behind him. This has changed. We found that, in general, it
was confusing for new users when Kodu couldn’t see something while the user could see it “right there!”.
Old behavior: Kodu cannot see behind him and Kodu cannot see through hills or walls.
New behavior: Kodu can see in all directions and through hills or walls. The old behavior can be recreated programmatically if needed. Instead of programming:
WHEN See Apple Red DO Move Toward
You can add filters to the sight sensor like this:
WHEN See Apple Red InFront LOS DO Move Toward
The “InFront” tile says to only see things in front of you.
“LOS” stands for “line of sight”. With this tile you can only see things in your line of sight. Things hidden behind terrain or walls are not visible.
Right now, the level that I’ve included doesn’t have either of the filters in place. If you run it, Kodu will find and eat all of the red apples. After demoing this you could
go in and add the “InFront” tile to Kodu’s programming. After adding this tile, Kodu will go and eat the first apple and then just stop because he’s facing away from all the other apples. At this point you can get back to the lesson and add the WHEN See Apple
Red InFront Not DO Turn. This will cause Kodu to spin around when he can’t see an apple in front of him.
As an alternative we often use the line WHEN Always DO Move Wander as the last line of kode. This helps demonstrate that rules with lower line numbers have priority. While
Kodu sees red apples he will move toward them but if he doesn’t see any then the Wander behavior will take over.
Here's a link to the re-created version of Activity 1 - Eating Apples