You are on page 1of 9

1.

3 Kodu


4
4
4
(Game
Levels)






Kodu
5


Kodu () (
) WHEN
DO

2.1 Kudo
Kodu (Domain-specific language)
(Grammar) Kodu
Kodu
(Terrain)


Kodu
Kodu 4
5
Kodu ( )
Kodu

When Condition Do Action


(When) (Condition) (Do) (Action)
Kodu
1. Kodu

2. Kodu (
)
3. Kodu (bump) Kodu (it)

4.
3 Kodu 1

5. 5
Kodu
2.2 Kudo
Kodu

When Condition () Do Action ( )
Kodu
(Kodu Grammar)

Kodu

Kodu Kodu

Production Rules
Variables Terminals
Variable > Variables Terminals
Variable () Rule,
Condition, Action, Sensor, Filter, FilterSet, Actuator, Selector, Modifier
Terminal
kodu, cycle, apple, see, move, red, eat, toward, quickly, hear

Kodu
()

Production Rules
(When D0 ) Production Rules
Production Rules
Terminal

Kodu

2.3 Kudo
(Production Rules)
1. Rule > Condition Action
Rule Condition Action
(Variable)
Kodu

2. Condition > Sensor Filter
3. Action > Actuator Selector Modifier
Sensor ( ) Filter () Actuator () Selector () Modifier ()


( Variable
Terminal )
Sensor Filter Condition
Rule > Sensor Filter Action
Action Rule > Sensor Filter Actuator Selector Modifier

4. Sensor > see | hear | bump
5. Filter > apple | blue | health
6. Actuator > move | shoot| add

7. Selector > toward | me | avoid


8. Modifier > 5 points | red | quickly
Terminals (Vertical bar)
hear Sensor, apple Filter,
add Actuator

Kodu Kodu

Rule > Condition Action


Rule > Sensor Filter Action
Rule > see Filter Action
Rule > see apple Action
Rule > see apple Actuator Selector Modifier
Rule > see apple move Selector Modifier
Rule > see apple move toward Modifier
Rule > see apple move toward quickly
Terminal Kodu

When see apple Do move toward quickly


When Do Kodu

Kodu

2.4 Kudo
1 2 3 Rule
Kodu

Game Actors

Game > Actors
Object Object Actors

Actors > Object | Object Actors


( Actors )
(Actors ) (Recursive function)
Object Actors Object
Page 12
Object > Page | Page Object

Rule
Page > Rule | Rule Page
Condition Action
(Nested Rules) Page

(Game Level)
Rule > Condition Action | Condition Action Page
Condition Action