American radio adventure series of the 1950s were unobtrusively sponsored by breakfast cereals, as the following modest example demonstrates. Note that the scene-changing for the commercial break needs to know nothing about the actual programme it breaks into: if Part I were replaced with a different Space Patrol episode, Part II need not be changed at all.
"Space Patrol #57 - 1953-10-31 - Stranded on Jupiter!"
Use scoring.
Part I - Serial
Red Spot is a room. "You are in the middle of a vast red oval plain. Overhead, the thick Jovian clouds swirl menacingly, and a fine acrid dust falls instead of rain." Some acrid dust is scenery in the Red Spot. The description of the dust is "The rust-colored dust coats every surface. You've no idea how deep it goes."
Instead of going in Red Spot, say "As you once told Cadet Lucky, Jupiter's a mighty big planet, maybe bigger than Iowa. Why, the Red Spot alone stretches out almost to the horizon."
The player wears a silver uniform and rubber boots. The player carries a shovel and an Analscope. The description of the Analscope is "As you recall from Space Patrol #9 - 1952-11-29 - The Electronic Burglar, the Analscope is a device for locating buried metals. That's what guided you all the way from the orbit of Uranus. (Oh, all right, Neptune.) If only you hadn't crashed!"
The metal plate is a fixed in place container. It is openable and closed. In the metal plate is some water. The description of the metal plate is "Stamped with the distinctive logo of the previous mission."
Instead of examining the player, say "Your hair clumps together stickily, thanks to the dustfall."
Digging is an action applying to one thing. Understand "dig [something]" or "dig in [something]" as digging.
Instead of digging the dust, try looking under the dust. Instead of looking under the dust when the metal plate is not visible: move the metal plate to the location; say "You brush aside the dust underfoot and -- what were the odds? -- it turns out that you landed just where the previous landing party did, thirteen ill-fated years ago. Here is the metal plate that covers their original well.
But wait! Called by the clanging of your shovel on the plate, a band of Jovian pterodactyls swoop down to attack! You're totally defenceless! You don't have a hope! You're absolutely finished!"; increase the score by 10; move K-Klak to Red Spot.
K-Klak the Pterodactyl is an animal. "K-Klak, leader of the Jupiter Pterodactyls, menaces you. A terrifying creature of scaly wings, with a dragon's tail, K-Klak stands... about 1/8th of an inch tall." Instead of doing something to K-Klak, say "K-Klak makes a frankly panicky noise and leaps backwards, out of your way."
After opening the metal plate: increase the score by 10; say "You have found water! You're saved! K-Klak makes a (very cautiously) pleased noise. Now to find the stolen Brainograph, and track down the crook with the thick Jewish accent and his henchmen with their thick Polish accents..."; end the story finally.
The maximum score is 20.
Part II - Cereal
When play begins, say "Instant Ralstons and Regular Ralstons, the hot whole-wheat cereals in the red and white checkerboard packages present... SPACE PATROL... High adventure in the wild vast reaches of space... Missions of daring in the name of interplanetary justice... Travel into the future as Buzz Corey, Commander-in-Chief of the..."
Last score is a number that varies. Every turn: now the last score is the score.
Ralstons Ad is a scene. Ralstons Ad begins when score is not the last score. Ralstons Ad ends when the Ricechex is consumed.
Include Basic Screen Effects by Emily Short.
When Ralstons Ad begins:
center "*** We'll be back in just a moment! ***";
pause the game;
strip the player;
move the player to the Kitchen.
When Ralstons Ad ends:
center "*** And now, back to today's exciting adventure ***";
pause the game;
restore the player.
Saved location is a room that varies. Locker is a container. Wardrobe is a container.
To strip the player:
now every thing carried by the player is in the locker;
now every thing worn by the player is in the wardrobe;
now saved location is location.
To restore the player:
now every thing carried by the player is in the Kitchen;
now every thing in the locker is carried by the player;
now every thing in the wardrobe is worn by the player;
move the player to saved location.
The Space Patrol Kitchen is a room. "The nerve center of the Space Patrol! This is where cadets fill up with their SUPER-FUEL. North leads to the astro control room, while back south is the cargo hold." A breakfast bowl is in the Kitchen. In the bowl is Ricechex. Ricechex is edible. The Ricechex can be consumed or uneaten. The Ricechex is uneaten.
Instead of going north in Kitchen: say "[refusal to leave]". Instead of going south in Kitchen: say "[refusal to leave]".
Instead of examining the player when Ralstons Ad is happening: say "You are currently being played by a generically attractive person of about 30, with very good teeth and well-kept nails."
After eating the Ricechex: say "That's right folks, always start your day the SPACE PATROL way with a tasty bowl of Ricechex, Wheatchex or good hot Ralstons. Mmmm Mmmm. You just can't get enough of the sugary goodness in Ricechex, Wheatchex and good hot Ralstons."; now the ricechex is consumed.
Instead of tasting the Ricechex:
say "Wow! *wolf-whistle* Man oh man oh man! Yumm-y!"
To say refusal to leave:
repeat through Table of Refusals:
say "[nope entry][paragraph break]";
blank out the whole row;
rule succeeds;
say "You can't. Eat your Ricechex."
Table of Refusals
nope
"You can't go that way in the limited universe of this sponsored message."
"Or that way."
"You've already tried that!"
"Why would you want to walk away when you have an alluring bowl of Ricechex right here?"
Test me with "n / i / x me / x dust / dig dust".
Test ad with "n / s / n / s / n / i / x me / get bowl / taste ricechex / eat ricechex".
Test ending with "x plate / x k-klak / open plate".
Episode 57 of "Space Patrol" was actually called "Iron Eaters Of Planet X", just in case the reader feels that any of the foregoing unfairly traduces a work of thoughtful science fiction.
Scenes can have properties -- a fact that is very useful when it comes to writing a series of scenes that all need to act alike in some respect.
Suppose we have a plot that features a number of scripted scenes, where we need the player to stand still and wait while the events of the scene play out. One way to set this up is to create a property for such scenes -- let's call them "restricted" -- and then write a rule that keeps the player in place while the scene happens:
"Bowler Hats and Baby Geese"
Section 1 - The Procedure
A scene can be restricted or free.
Instead of going somewhere during a restricted scene:
say "Better to stay here for the moment and find out what is going to happen next."
And now let's set up our restricted scene. In it, a clown is going to turn up wherever the player is (it doesn't matter where on the map he's gotten to at this point) and do a performance; the player will not be able to leave the area until the performance completes. We'll start with the setting:
Section 2 - The Stage and Props
The Broad Lawn is a room. "A sort of fun fair has been set up on this broad lawn, with the House as a backdrop: it's an attempt to give local children something to do during the bank holiday. In typical fashion, everyone is doing a very good job of ignoring the House itself, despite its swarthy roofline and dozens of blacked-out windows."
The House is scenery in the Broad Lawn. The description is "A cautious vagueness about the nature of the inhabitants is generally considered a good idea. They might be gods, or minor demons, or they might be aliens from space, or possibly they are embodiments of physical principles, or expressions of universal human experience, or... at any rate they can run time backward and forward so it warbles like an old cassette. And they're always about when somebody dies. Other than that, they're very good neighbors and no one has a word to say against."
Instead of entering the House:
say "You can't go in, of course. It's not a house for people."
The Gazebo is north of the Broad Lawn. "The gazebo is sometimes used for bands, but at the moment has been appropriated for the distribution of lemonade."
The clown is a man. "A clown wearing [a list of things worn by the clown] stands nearby." The description is "He winks back at you."
The clown wears a purple polka-dot bowler hat. He carries a supply of baby geese. The description of the supply of baby geese is "Three or four. Or five. It's hard to count." Understand "goose" or "gosling" or "goslings" as the supply of baby geese.
There are some eggs. The description of the eggs is "A blur, really."
There is a Spanish omelet. The description of the Spanish omelet is "Exquisitely prepared."
...And now the scene itself:
Section 3 - The Scenes
The Clown Performance is a restricted scene. Clown Performance begins when the turn count is 3.
When Clown Performance begins:
move the clown to the location.
Every turn during Clown Performance:
repeat through the Table of Clowning:
say "[event description entry][paragraph break]";
blank out the whole row;
stop.
When Clown Performance ends:
now the eggs are nowhere;
now the clown carries the omelet.
Clown Performance ends when the number of filled rows in the Table of Clowning is 0.
Table of Clowning
event description
"A clown with a purple polka-dot bowler hat strides into the vicinity and begins to juggle baby geese."
"While the clown juggles, the baby geese visibly grow older and larger. The clown becomes unnerved."
"In an attempt to resolve the problem, the clown reverses the direction of his juggling. The geese revert to goslings."
"The goslings become smaller and smaller until the clown is juggling goose eggs[replace eggs]."
"The clown throws all the eggs into the air at once and catches them in the bowler hat. He takes a bow; the audience applauds. As a final gesture, he upends his hat to release a perfectly cooked omelet."
To say replace eggs:
now the supply of baby geese is nowhere;
now the clown carries the eggs.
Free Time is a scene. Free Time begins when Clown Performance Ends.
Test me with "scenes / n / z/ z / look / x geese / s / x geese / x eggs / z / s".
"Day One"
Lecture is a scene. Lecture begins when play begins.
Every turn during Lecture:
repeat through Table of Lecture Events:
say "[event entry][paragraph break]";
blank out the whole row;
rule succeeds.
Here we use a table (see subsequent chapters) to keep track of all the events we wish to have occur during the course of the scene.
Table of Lecture Events
event
"'Welcome to Precolumbian Archaeology 101,' thunders Dr Freitag from the front of the class. 'Miss-- yes, you in the back. If you can't find a free seat, how are you going to find Atlantis? Sit down or leave. Now. Thank you.'"
"Freitag stands behinds his desk and lines up the pile of books there more neatly. 'It has come to my attention over previous years that there are two sorts of person who enroll in my class,' he says.
'Some of you will be members of the swim team or women's lacrosse players who have a distribution requirement to fulfill and are under the mistaken impression that archaeology must be easier than psychology. If that description applies to you, I advise you to drop the class now rather than at the midterm break. Under absolutely no circumstances will I ever sign a withdrawal form for someone who is crying at the time. Make a note of that, please.'"
"'The second sort of person,' Dr Freitag says, getting another wind. 'Yes, the second sort of person takes this class because she imagines that it is going to lead to adventure or possibly to new age encounters with dolphins.'
His eye moves over the class, lingering an especially long time on a girl in a patchwork skirt.
'You should also leave now, but since you are probably lying to yourself about the reasons you're here, you will probably not heed my warning and we will be doomed to a semester of one another's company nonetheless.'"
"'Whatever you may tell yourself, you are not here to gain a deeper understanding of the world or get in touch with yourself or experience another culture.'
He paces before the first row of desks, hammering on them one at a time. 'I know you probably wrote an admissions statement saying that that is what you hoped to do. Well, too bad. It is not inconceivable that some of you, somehow, will muddle towards a deeper understanding of something thanks to this class, but I am not holding my breath, and neither should you.'"
"Freitag takes a breath. 'No, my dear freshwomen, what you are here to do is learn facts. FACTS. Facts are unpopular in this university and, I am unhappily aware, at most of the institutions of inferior preparation from which you have come. Nonetheless, facts it will be. I will expect you to learn names. I will expect you to learn dates. I will expect you to study maps and I will expect you to produce evidence of exacting geographical knowledge on the exams. I will expect you to learn shapes of pottery and memorize masonry designs. There are no principles you can learn which are more important or more useful than a truly colossal bank of facts right there in your own head.'"
"'I do not ever want to hear that you do not need to learn things because you will be able to look them up. This is the greatest fallacy of your computer-semi-literate generation, that you can get anything out of Google if you need it. Not only is this demonstrably false, but it overlooks something phenomenally important: you only know to look for something if you already know it EXISTS. In short there is no way to fake knowledge, and I am not going to pretend there is.' He smiles in lupine fashion.
'This class is likely to be the most miserable experience of your four years in university. Clear?'"
"Everyone is silent."
"The lecture is interrupted by the shrill of a bell."
And then we define the scene so that it ends when the table runs out.
Lecture ends when the number of filled rows in the Table of Lecture Events is 0.
One advantage of this is that we can then edit the events in the scene by changing just the table; the scene will always run the right length and end on the turn when the last event occurs.
And to add a few additional details:
Instead of doing something other than waiting, looking, listening or examining during Lecture:
say "Dr Freitag glares at you so fiercely that you are frozen into inaction."
Notice the careful phrasing of "doing something other than..." so that we do not mention the objects; if we had written "something other than listening to something...", the instead rule would match only action patterns which involved a noun. We state the rule more generally so that it will also match nounless commands such as JUMP and SING, since Freitag will probably take a dim view of those as well.
When Lecture ends:
now Freitag is nowhere;
say "There is a flurry of movement as your fellow students begin to put away their books. Dr Freitag makes his way to the door and is gone before anyone can ask him anything."
The Classroom is a room. Dr Freitag is a man in the Classroom. "Dr Freitag paces before the blackboard."
Test me with "listen / x dr / x me / jump / z / z / z / z / z / x dr".