Terminator — 28 of 33

Matt Weiner

Release 0

Chapter 12 - Tutorial and Rescue Mission

Tutorial is a scene. Tutorial begins when play begins. Tutorial ends when time to end the tutorial is true.

Time to end the tutorial is initially false. Almost time to end the tutorial is initially false.

The block waking up rule does nothing if Tutorial is happening.

Carry out waking up: now time to end the tutorial is true.

Carry out launching during Tutorial: now time to end the tutorial is true.

Rescue Mission is a scene. Rescue Mission begins when Tutorial ends.

When Tutorial begins:

now the left hand status line is "Learning About Robots";

deploy the spaceship exterior;

set Gamma down at the (x-coordinate of the spaceship exterior + 6) by the y-coordinate of the spaceship exterior;

deploy Beacon One;

deploy Beacon Three.

When Rescue Mission begins:

say "Your mind snaps back to the present. You quickly establish contact with the robots on the surface.";

repeat with item running through things in Planet:

reset item;

repeat through the Table of Planetary Surface:

now the elevation entry is 0;

blank out the feature entry;

now robots looking for the first time is true;

generate the world;

now acting out of world is false; [so the silent wait still triggers the every turn rules, and robot vision]

try silently waiting.

Last every turn during Tutorial: follow the tutorial rules.

The expected action is a stored action variable.

The tutorial rules are a rulebook.

Awaiting action is initially false.

A tutorial rule:

if successfully followed instructions is true:

now successfully followed instructions is false;

repeat through the Table of Tutorial Instructions:

if there is a text entry:

say italic type;

say the text entry;

say roman type;

say line break;

if there is an action entry:

now the expected action is the action entry;

now awaiting action is true;

otherwise:

now the expected action is the action of launching;

now awaiting action is false;

if there is a next step entry:

follow the next step entry;

otherwise:

say line break; [the next step rule prints a line break if it's there. if there isn't one, we print a line break anyway]

otherwise: [shouldn't happen]

now almost time to end the tutorial is true;

blank out the whole row;

if the Table of Tutorial Instructions is empty:

now almost time to end the tutorial is true;

break. [The repeat through the table, which means we just look at one row at a time.]

Before an actor doing something when almost time to end the tutorial is true:

if the current action is the expected action:

now time to end the tutorial is true.

Successfully followed instructions is initially false.

Before an actor doing something when the current action is the expected action:

now successfully followed instructions is true;

now awaiting action is false.

Every turn when awaiting action is true and successfully followed instructions is false during Tutorial:

say "[italic type]You didn't accomplish the action I was expecting, which was [expected action]. The instructions for the tutorial won't necessarily line up with what's happening if you don't follow them exactly for now. You might want to UNDO and try again, or if you want to take your chances on the next part of the tutorial then [expected action] will advance you to it.[roman type][line break]";

now awaiting action is false. [Don't keep nagging.]

Table of Tutorial Instructions

textactionnext step (a rule)
"You just got a report from Gamma, a robot on the surface. Try telling it to go west by saying 'GAMMA, WEST.'"gamma going west--
"Since the robots you're commanding are keyed to the wrecked ship, not yours, they can't tell you where they are relative to you on the grid. But they can tell you what they see around them. Try 'GAMMA, WEST' again."gamma going west--
"Now Gamma can see the exterior of your spaceship, which will always land at the western edge of the playable surface.[paragraph break]Now we'll introduce another robot, Alpha. Try telling Alpha to go north with 'ALPHA, NORTH.'"alpha going northdeploy alpha rule
"And you can tell both robots to go north at once. Try 'GAMMA AND ALPHA, NORTH.'"gamma going north--
"Now Alpha can see your spaceship. You can tell Alpha to move toward it. Try 'ALPHA, MOVE TOWARD SPACESHIP.'"Alpha going north
"You can also command all the robots at once by saying something like 'ROBOTS, SOUTH.' (Since every command takes a turn, and you only have so much time before the sun burns everything up, it can be very useful to command multiple robots; when you're exploring new territory or dashing for the spaceship. [paragraph break]Anyway, try 'ROBOTS, SOUTH' and then we'll introduce a new robot to the scene."Gamma going southdeploy Zeta rule
"Notice that this new robot, Zeta, can't see anything, but Alpha sees a 'hauler' to the east? Alpha and Gamma (and Beta, in the main game) are scouts, which are smaller, faster, and see farther. Zeta (and Delta and Epsilon) are haulers, which are slower and bigger--and the only robots that can pick up and rescue astronauts.[paragraph break]You can refer to robots as 'scout' and 'hauler'; try 'SCOUTS, GO TOWARD HAULER' now."Alpha going southeast--
"Gamma couldn't go toward a hauler because it can't see one! Now the scouts have something up their sleeves. Try 'ROBOTS, INVENTORY' to see what each robot is carrying."Gamma taking inventory--
"The scouts carry beacons. The robots can detect these beacons from anywhere on the map. Try 'GAMMA, DROP BEACON THREE.'"Gamma dropping Beacon Three
--
"And now try 'ROBOTS, GO TOWARD BEACON THREE.'"Alpha going northeast--
"Note that Zeta and Alpha could move toward Beacon Three even though they can't see it.[paragraph break]To have Gamma take the beacon back, try 'GAMMA, PICK UP BEACON THREE' now. (By the way, beacons work even when scouts are carrying them.)"Gamma taking beacon three--
"Great! You can experiment with the robots' capabilities now. Whenever you're ready, type 'TAKE OFF' to finish your training mission and return to the rescue. In the main mission 'TAKE OFF' will end things immediately (otherwise, your ship will automatically take off when you've gathered all the astronauts and robots, or when the sun reaches your ship).[paragraph break]Remember, robots can move toward everything they can see, including planetary features. The sun will come from the east, and don't let anything get caught in it! It shines on higher features first, so watch out moving to higher ground.[paragraph break]Good luck!"----

This is the deploy alpha rule:

set alpha down at 1 by (grid size / 2) - 6.

This is the deploy Zeta rule:

set zeta down at 3 by (grid size / 2) - 6.

To reset (item - a thing):

remove item from play;

now the x-coordinate of item is -99;

now the y-coordinate of item is -99.

To set (item - a thing) down at (x - a number) by (y - a number):

now the item is in the Planet;

now the x-coordinate of the item is x;

now the y-coordinate of the item is y;

if the item is a robot:

now the x-displacement of the item is (the slowness of the item + 1) / 2;

now the y-displacement of the item is (the slowness of the item + 1) / 2;

After Gamma taking inventory during Tutorial:

follow the Tutorial rules. [Since inventory doesn't take time and doesn't trigger the Every Turn rules, we need to trigger them by hand.]