Polly Game

The high level goal is a game that kids play. As they get through successive levels of this game they learn two different sets of skills:

• How to program in Java

• How to create interactive non-linear narrative stories with engaging characters

In the on-line version of the game, they also learn social engagement with other kids through jointly creating interactive worlds of socially engaging narrative characters.

Each level consists of a sequence of puzzles. When a player solves a puzzle she advances to the next puzzle. After having solved all the puzzles in a level, the player advances to the next level. The first three levels teach successively more advanced forms of narrative authoring. Here are the three first levels:

1. Single polly

1. Make Sally turn red
```       sally.setColor(red);
```
2. Have Sally find some food.

3. First have Sally find some food. After Sally finds the food, have Sally find a place to nap.

In English this might be described as follows:

```    Things about Sally:

Whenever Sally is hungry, Sally finds food.
Whenever Sally is sleepy, Sally finds a bed.

The scene:

Sally becomes hungry.
Once Sally is no longer hungry, Sally becomes sleepy.
```
A player might specify this in Java with something like:
```

sally.whenever("hungry", "find", "food");
sally.whenever("sleepy", "find", "bed");

// The scene:

sally.set("hungry");
sally.once("not hungry", "set", "sleepy");
```
There are some difficult questions here. For example:

• Is the above a good way to do long or complex conditional scenes?

• Should this all be defined as a set of clauses in a finite state machine? Should methods like "once" just trigger those clauses?

Note that if we were able to make a custom syntax, we could say things like:

```

sally.whenever("hungry", "find", "food");
sally.whenever("sleepy", "find", "bed");

// The scene:

sally.set("hungry");
sally.when("not hungry") {
sally.set("sleepy");
}
```
But then we're not working in Java.

This level teaches how to set properties, and how to make decisions when conditions have been satisfied.

2. Two pollys

1. John wants to play with Sally, but Sally is shy, and stays away.
2. John wants to play with Sally, but Sally is shy, and stays away. So John finds a toy. Sally's interest in playing with the toy overcomes her shyness, and she agrees to play with John.

This level teaches interaction between two different characters, as well as sequencing and picking up objects.

3. Three pollys

1. John and Sally are playing with each other. Jane enters.
2. Either John or Sally goes off with Jane.
3. The polly who was left alone gets a toy and joins the other two.
4. All three pollys go off together.

This level teaches choosing variation in a storylines.

The above scene raises some questions. For example, consider the bits of business in the scene "I'm the polly that goes off with the third one" and, alternately, "I'm the polly that doesn't goes off with the third one, but instead finds a toy and then joins the other two." These could each be defined as dynamic properties of a particular polly. A scene could be authored by handing such dynamic properties off to the various pollys as a scene progresses.