Tutorial: Building a Very Basic Game

1.  To begin, once you have started Kodu, Run “Kodu” /
2.  In the menu that appears click “New World” / New World
3.  Edit your game.
4.  Now we will build a small basic piece of land by adding terrain. Use the building tools.
4a. Click on the icon that looks like a brush (numbered 1).
4b. Click on the terrain selector (numbered 2).
4c. Select a terrain. Then paint your terrain on your ground.
Left clicking adds terrain, right clicking removes terrain.
Use the HAND to move the camera if needs be. You can move forward and back (left click), and also rotate the camera (right click) /



Once you have your basic terrain, add some apples. You can do this once and copy and paste it:
5.  Click on the add object icon
6.  Click on “Apple”
7.  Right click on the apple and go to Change Size.
8.  Change the size by dragging the green bar up. Press on the ‘X’ when done.
9.  Right click on the apple again, and select “Copy
10.  Right click somewhere else in your land and press Paste. Repeat this 6-8 times, to get apples spread all over your land. /





11.  Add another object (see if you can remember how). This time add a KODU. He will appear on your land.
Drag your Kodu to the beginning of your terrain (somewhere near the front). / 
12.  With Object mode already selected, right click on your newly added Kodu, Click “Change Height.”
Set the height to 0.60. Press ‘X’ when complete. / 
Time to Save
  
Click on the House Icon  Select ‘Save My World’  Enter a name and description  Click Save

Programming the Kodu


When we use the word “Program” or “Programming” we mean, telling the computer what to do, by giving a bot or object a set of instructions.
Code is made up of PAGES (up to 12)

PAGES are made up of SCORES of code (up to 7 per page)

A SCORE is a line of instructions for a particular object or bot.
E.g. WHEN: see apple, DO: Eat it. (i.e. when you see an apple, eat it)

1.  With the add objects icon selected, Right click on your Kodu object and click PROGRAM.
Notice you are on PAGE 1 of your code for this object. / 

2.  Click on the + next to WHEN (Circled)
3.  Select Keyboard / 
Your WHEN block will be updated on SCORE 1
4.  Click on the + next to keyboard.
5.  Click on “Misc”
6.  Click on “Up” /  
7.  Click on the “+” next to DO /
8.  Click on “Move” /
9.  Click on the “+” next to “Move” (circled)
10.  Select Forward / 
11.  Click on the + after forward on your score.
12.  Click Quickly / 
You should end up with this score.
If you make a mistake, move the pencil with the arrow keys and click DELETE on your keyboard. /
13.  Add two extra scores to your KODU object. (Stuck? Go over Step 1 in this section again)
Score 2: WHEN: Keyboard, Left, DO: Turn Left Quickly

Score 3: WHEN: Keyboard, Right, DO: Turn Right Quickly

14.  Press ESCAPE when done.
15.  Save your work
 
Click on the House Icon  Select ‘Save My World’  Enter a name and description  Click Save
16.  Press ESCAPE to TEST Your game so far, or press

Adding Game Play

Its time to add additional game code to your game, to make it into a real game (a simple one, but real!)

1.  Add code to your KODU object to score 4-6. Not sure how to do this? Follow step 1 in the previous section to get to the program screen.

Add the following scores:

Score 4: WHEN: Keyboard Space is pressed DO shoot a blue blip:

Score 5: WHEN: Shot hit at an Apple DO: Add 5 points on to the score.

Score 6: WHEN: Score reaches 300 points, DO: Blue player WINS

2.  Press ESCAPE when done.

3.  Save your work

 

4.  Press ESCAPE to TEST Your game so far, or press

Changing Settings (Optional)

You can change the way in which your objects work, and also your entire game.

1.  Click on your object tool
2.  Right click on your kodu object and click “Change Settings.” / 
3.  Here you can change many of the settings for Kodu, such as the speed. Explore these and adjust these. /
4.  Also explore this button, to set the WHOLE game settings such as backgrounds etc. /

5