Hi.
I feel like I’m hitting my head against a brick wall. I have what is essentially a working game (use that term loosely). It’s just a small thing I wrote for myself. What is supposed to happen is this. Player wakes up. Player should investigate the room. There should be three things to do: read the book, look through the hole, listen at the door. When all three things have occurred, a man walks in. He asks some questions. Man leaves. Pretty much, the end…
I’ve pasted my whole code for review. Apologies. It’s very messy. Not far from complete though. Thank you very much for any consideration or advice.
Questions.
-
I’d love to have the banner at the start…then the action. I couldn’t seem to achieve that, so I’ve suppressed the banner altogether. Any ideas on how I can do it (banner then action)?
-
Really annoying. Reading the book scores 5 points. I cannot get looking through the hole or listening at the door to score 5 points. The actions fail. I cannot work out why. I’m intending to make it so that the man comes in the room when the score is 15.
-
Better way to script the last part (scene 2 with the questions) without relying on time?
[code]“Patient-42” by Frank Zafka
Include Basic Screen Effects by Emily Short.
The story headline is “A Short Existential Adventure”
The story genre is “existential”
The story description is “You awake in a room, with no memory of who you are, or where you are. Is there a secret for you to discover.”
Use scoring.
Rule for printing the banner text: do nothing.
The describe room stood up into rule is not listed in any rulebook.
The describe room emerged into rule is not listed in any rulebook.
The room description heading rule is not listed in the carry out looking rules.
Rule for printing the name of a room: do nothing.
When play begins:
move player to bed, without printing a room description;
say “[story description]”.
Instead of doing something other than waiting or looking or exiting when the player is in the bed:
say “You cannot do that from the confines of the warm bed.”;
stop the action.
Before exiting when the player is in the bed:
say “You pull back the covers and swing your feet out. Your naked toes curl at the cold of the stone floor. You rise out of the warm bed and look around.”;
continue the action.
The description of the player is “There is no mirror in the room, but looking down at your body, you seem to be a complete human being. You seem to be a paper nightgown, under which you appear to be naked. You rub your head and notice that you have hair. You’re not bald at least.”
The Cell is a room. “The room is small. There is a small single bed. Opposite the bed is a door. There are solid brick walls to the West, East and South.”
A container called the bed is in the cell. The description is “This is the single bed in which you awoke, now unmade. It is has a metal frame (is it brass?) and the mattress is sprung. There is a small duvet. It has no cover, and from the feathers that are protuding in places, we can assume that it is stuffed with bird feathers.” The bed is fixed in place.
The table is in the cell. The description is “Next to your bed is a small table. It has three legs and reaches to your knees. It is made of wood, and appears to be bolted to the floor. Upon the table is a book.” The table is fixed in place.
The chair is in the cell. The description is “There is a small wooden chair. There appears to be nothing special about this chair.” The chair is fixed in place.
A thing has some text called the reading-material. The reading-material of a thing is usually “”.
The book is in the cell. The description is “The book is sitting on the table. Nothing on the cover suggests its contents. It is bound in leather, coloured blue.” The reading-material of the book is “Inside the book are words you understand at least. It appears to be some kind of autobiographical information.: Your name is Louie. You were born 38 years ago. You have a cat called Ziggy. And so on. You turn a page and see the word instruction highlighted with many exclamation marks. Under this heading are these words: Commit as much of this information as possible to memory. You will be interrogated on it, and you will suffer if you answer questions incorrectly.”
After reading the book for the first time:
increase the score by 5;
say “You ask yourself, whether you wrote the book. You don’t remember writing the book, and none of the details seem familiar. You are also curious. What kind of hospital punishes somebody for not being able to remember?”
Waiting more is an action applying to one number.
Understand “wait [a time period]” or “wait for [a time period]” or “wait for a/an [a time period]” or “wait a/an [a time period]” as waiting more.
Carry out waiting more:
let the target time be the time of day plus the time understood;
decrease the target time by one minute;
while the time of day is not the target time:
follow the turn sequence rules.
Report waiting more:
say “It is now [time of day + 1 minute].”
Check waiting more:
if the time understood is greater than one hour, say “You really haven’t got that kind of patience.” instead.
Understand the command “read” as something new.
Reading is an action applying to one thing and requiring light.
Understand “read [something]” as reading.
Check reading:
if the reading-material of the noun is “”:
say "Nothing is printed on [the noun].” instead.
Carry out reading:
say “[reading-material of the noun].”
The West Wall is scenery in the Cell. The description is “Solid cement blocks.”
The South Wall is scenery in the Cell. The description is " Solid cement blooks. You notice that there is a small hole."
The East Wall is scenery in the cell. The description is “Solid cement blocks.”
The North Wall is scenery in the cell. The description is “Solid cement blocks. There is a door in the wall.”
The cell door is north of the cell and south of the hall. The description is “The door is solid. There is no handle upon the door, nor is there any apparent method of opening it. The fit between the door and the wall is perfect. You couldnt fit a single piece of paper between them.” The cell door is a locked closed door.
The Library is a room.
The small hole is a door. The small hole is south of the cell and north of the library. The small hole is a closed unopenable door. It is scenery. Understand “opening” as the hole.
Instead of searching the small hole:
say “Looking through the small hole, you see the room next door is some kind of library. Directly across from the hole is a book shelf, with row upon row of books. Each book appears to be bound in the same kind of leather as the book in your room, but the books have different colour covers (not just blue). You move your eye around the scene, trying to discern anything new. You spend some time looking, but there is nothing more to be learnt from the hole.”
After searching the small hole for the first time:
increase the score by 5;
say “You ask yourself, what are all those books?”
Instead of listening to the cell door:
say “You hear mumbles and other noises coming from behind the door. But you can’t make out anything intelligble.”
After listening to the cell door for the first time:
increase the score by 5;
say “You ask yourself, is this a hospital or a prison?”
To say (relevant time - a time) as 24h time:
let H be the hours part of relevant time;
let M be the minutes part of relevant time;
say “[H]:[if M is less than 10]0[end if][M]”.
Mr X is a man in the hall.
At 8:00 AM:
move Mr X to the cell;
move the player to the bed;
say "Suddenly, the door swings open, and a large man with a clip board walks in. You stumble backwards from the door and sit upon the bed. The man sits down on the chair and gives you a long hard stare. "
At 10:30 AM:
say "Suddenly, the door swings open, and a large man with a clip board walks in. You stumble backwards from the door and sit upon the bed. The man sits down on the chair and gives you a long hard stare. ";
now the command prompt is "What is your name? ".
After reading a command when the command prompt is "What is your name? ":
if the player’s command matches “Louie”:
say “The man seems pleased with the answer.”;
otherwise:
say “'The man frowns. Is that displeasure?”;
now the command prompt is “>”;
reject the player’s command.
At 10:31 AM:
say “The man inhales.”;
now the command prompt is “How old are you?”.
After reading a command when the command prompt is “How old are you?”:
if the player’s command matches “38”:
say “The man seems pleased with the answer.”;
otherwise:
say “'The man frowns. Is that displeasure?”;
now the command prompt is “>”;
reject the player’s command.
At 10:32 AM:
say “The man inhales.”;
now the command prompt is “What is your cat’s name?”.
After reading a command when the command prompt is “What is your cat’s name?”:
if the player’s command matches “Ziggy”:
say “The man seems pleased with the answer.”;
otherwise:
say “'The man frowns. Is that displeasure?”;
now the command prompt is “>”;
reject the player’s command.
At 10:34 AM:
say “The man turns to you and says Tomorrow, you will do better!, and then promptly leaves.”;
Move Mr X to the hall.
At 10:35 AM:
say “You wonder to yourself. What is this all about? What kind of hospital is then? Am I the only patient? You look at the book and you ask yourself, did you write the words inside? Are you Louie?”
At 10:40 AM:
end the story saying “Ha [paragraph break] The End?”;
[/code]