The Statue Got Me High: Annotated Source

Dec. 1, 2017
protect

I've annotated source text for several of my text adventures, to distribute to a certain tier of my Patreon supporters. One such Patreoneer told me that I should make some of the older annotations available publicly. Now, I'm not one to allow my Patreon supporters to boss me around—I'm an artist, and very passionate about my artistic integrity—but in this case the guy making the suggestion was Simon Carless, and him I do allow to boss me around.

So here is the annotated source code text of Simon's favorite game, "The Statue Got Me High." If you haven't played this game, you should definitely give it a look before you wade into the source. It shouldn't take more than an hour to play through.

"The Statue Got Me High," written as part of a tribute to the They Might Be Giants album Apollo 18 in 2012, is I think the third game I ever released. The nuts and bolts of the implementation do not meet the high standards that I hold myself to as an Inform 7 developer in 2017. Some of the code is embarrassing. But if you're interested in using Inform 7 to create text adventures, this should be a useful example to you—just, please, promise me you won't learn too much.

"The Statue Got Me High"

by Ryan Veeder (with apologies to Johns L & F)

Volume 0 - Introduction to the Annotated Source Code Text

[% Comments in brackets and italics, beginning with a % for some reason, are my 2015 annotations—or my 2017 annotations, new to this general release of the source text. Comments in brackets but not in italics are my original comments to the code, but you won't see many of those. The division headings are all original to the source, except for the one above, obviously. Oddly, it looks like I never declared a "Volume 1." Well, it's too late to do anything about it now.

The most basic explanation of this game's existence is explicated under "carry out abouting" below. I felt really lucky that I got "dibs" on my favorite Apollo 18 track (one of my favorite TMBG tracks, maybe one of my all-time favorite songs) and I really wanted to do it justice. I remember discussing the concept with my brother: That I should pay simultaneous homage to the Commendatore scene in Don Giovanni was a given, but I think it was his idea for the player character to fill the Leporello role. (Sean and I are big fans of the Commendatore scene only because our dad played that part of Amadeus for us over and over again when we were kids. We are not opera buffs.)

I also remember Sean worrying that if I released a game were centered around a dinner, following on the heels of Taco Fiction and You've got a Stew Going, I ran the risk of becoming "the food guy," the Weird Al of IF. I knew the risks, and I made this game. History will be my judge.]

The release number is 2.

[% I am sorry to say I have very little idea of what was changed or fixed for this version. I remember the wine bottles were very buggy, and so was John's behavior in the final scene. There are still bugs in this version, but rather than fix them for a version 3, I'll try to point them out to you as we go.]

The story headline is "A disaster simulator".

The story description is "As his personal assistant, your duty tonight is to make sure John's party is successful. This will not happen. Written for the Apollo 18+20 tribute album project."

[% This story description is uncharacteristically wordy, and on IFDB I've pared it down quite a bit. My philosophy on "blurbs" is informed quite a bit by how much Emily Short disliked the original blurb for Taco Fiction and how much Jenni Polodna loved the sentence "Taco Fiction is a game about crime."]

Use no scoring.

[% The latest versions of Inform 7 assume that a game will not use scoring—also, the latest versions of Inform 7 use the term "story" rather than "game." Back in 2012, though, you had to explicitly turn this option off.]

Include Basic Screen Effects by Emily Short.

[% Emily Short's Basic Screen Effects extension is what I use to make the player Press Any Key To Continue, a technique I rely on to manage pacing at a couple different points in this game.]

Release along with cover art and an interpreter.

Abouting is an action out of world. Understand "help" and "about" and "walkthrough" and "hint" as abouting.

Carry out abouting: say "[italic type]This game was written for the Apollo 18+20 project, organized by Professor Doctor Doctor Kevin Jackson-Mead, DDS. It's based on a song by They Might Be Giants.[paragraph break]My brother Sean and my friend Zach helped me out a lot with the concept and stuff, so props to those guys. This version fixes many bugs that were found by ClubFloyd, so props to those guys as well.[paragraph break]If you find yourself stuck in the game, just make sure you talk to everyone and explore everything thoroughly. Things [if the statue is onice]aren't as bad[otherwise]are exactly as bad[end if] as they seem[roman type]."

[% The "onice" or "onfire" status of the statue object is used as a global variable, indicating that things either have taken a sharp left turn or they haven't yet. When things get crazy, basically every bit of text in the game has to change to reflect that, so we'll see an "if... otherwise... end if" structure used over and over again.]

When play begins:
  now the right hand status line is "";
  say "John was already on his phone by the time you glanced over your shoulder. He had forgotten the whole joke; he wouldn't have noticed if you just turned around and walked back. Which you really wanted to do, for some reason.

It felt like a pretty stupid thing to be afraid of.

You got up the nerve to walk past the last few headstones, but you kept your head down. You didn't even want to look at the feet. You just kept your eyes on the pedestal, on the exact spot where you finally set down the envelope, and then you turned around.

John was still talking to his phone, oblivious. You could feel it, though, like a finger lightly scraping up the back of your neck.

And then jabbing into your spine so you had to turn back around and look up at its face. And you thought (right away you told yourself the idea was ridiculous) that it nodded.

[fixed letter spacing] [variable letter spacing][italic type][bracket]press any key[close bracket][roman type][paragraph break]";
  wait for any key;

[% I find myself unsatisfied with this introductory text. The problem is that the premise is too convoluted to support such an air of mystery. "Inviting a statue of a dead guy to a party" is a complicated concept, and has to be expressed somewhat explicitly in order for what follows to be intelligible.]

Chapter - Boring

[% Nowadays I typically make "Boring" its own volume. These are mostly verbs that don't affect the game state, but which, if I didn't assign new responses, wouldn't match the tone of the rest of the prose.]

The description of the player is "[if the statue is onfire]Suddenly you find the thought of looking at yourself disgusting.[otherwise]You look extremely presentable in your 'B' tuxedo: classy, but not too flashy; easy to ignore. Tuxedo B is the most appropriate for these intimate get-togethers with John's close friends. ([quotation mark]Intimate' is the word John uses for mixed groups; the parties to which only women are invited he calls 'friendly,' and they require a different tuxedo.)[end if]"

Instead of taking some scenery: Say "[if the location is Kitchen or the location is Tunnel or the location is Wine Cellar]You won't be needing that. You assume as much, anyway[otherwise if the statue is onfire]You can't save it. You have to escape[otherwise]It would be untoward to try rearranging [the noun] while guests are over[end if]."

Instead of attacking something: say "[if the statue is onfire]Violence begets violence begets violence et cetera et cetera et cetera[otherwise]No matter how frustrating things become, you must try to keep your head[end if]."

Instead of attacking someone: say "[if the statue is onfire]Violence begets violence begets violence et cetera et cetera et cetera[otherwise]No matter how frustrating things become, you must try to keep your head[end if]."

Instead of kissing someone: say "[if the statue is onfire]Too late for that[otherwise]Keep your mind on the party[end if]."

Check eating:
  if the noun is edible:
    say "That's for the guests." instead;
  otherwise:
    say "Surely you are not so desperate." instead.

[% I just checked, and NOTHING IN THE GAME IS EDIBLE. So much for being the Weird Al of IF!]

Instead of waking up: say "[if the statue is onfire]What makes you think this isn't real?[otherwise]You are very much awake.[end if]"

Instead of sleeping, say "[if the statue is onfire]You can sleep when you're dead[unicode 8212]which might be right now, actually. Hmm[otherwise]You'll have plenty of time to sleep after the party[end if]."

Instead of entering something:
  say "You are not the type to sit down on the job."

[% This makes more sense than it seems to, because Inform 7's default world model has a single "entering" action that covers going through doors, climbing inside of containers, and sitting down on things. When I added this rule I probably hadn't thought very much about exactly what enterable containers or sit-on-able supporters would be in the game, but I knew enough about the player character to decide that I should probably block this action generally—There's always the option to override a general rule like this with more specific rules.

UNFORTUNATELY I didn't think about this quite hard enough, so "You are not the type to sit down on the job" is also the response to >ENTER DOOR. Whoops!!!]

Chapter 2 - Rooms

Section 1 - Kitchen

Kitchen is a room. "[if the statue is onfire]Where's Chucky? It looks like he left in a hurry.[paragraph break]There seems to be something happening down in the dining room[otherwise]The kitchen, with all its drawers, its cupboards, its sinks and ovens, constitutes Chucky's domain, and he guards it jealously. Usually you use it only as a conduit between the dining room (south) and the tunnel to the cellar (down the stairs).[paragraph break]Of course, working in here is part of your job, so you and Chucky have a deal worked out. The deal is: You do not touch [italic type]anything[roman type][end if]."

The stairs are a backdrop. Understand "stair" as the stairs. The stairs are in Kitchen and Tunnel. The description of the stairs is "Creaky, but not dangerous."

Understand "go down stairs" and "go downstairs" as descending.

Descending is an action applying to nothing. Carry out descending: try going down.

Understand "go upstairs" and "go up stairs" as ascending. Ascending is an action applying to nothing. Carry out ascending: try going up.

Instead of taking the stairs:
  if the location is kitchen:
    try going down instead;
  otherwise if the location is tunnel:
    try going up instead.

The kitchen paraphenalia is scenery in the kitchen. Understand "cooking" or "sink" or "sinks" or "drawer" or "drawers" or "cupboard" or "cupboards" or "oven" or "ovens" or "knife" or "spoon" or "fork" or "counter" as the kitchen paraphenalia. The description of the kitchen paraphenalia is "[if the statue is onfire]No, Chucky might be back any minute[otherwise]If you just stand around looking, Chucky will start getting surly[end if]." Instead of doing something other than examining with the kitchen paraphenalia, say "You better not. Chucky would go ballistic."

Chucky is a man in Kitchen. Understand "cook" as Chucky. The initial appearance of Chucky is "[if Chucky carries the stack of place cards]Right now is an exception, apparently.[paragraph break]'John wants you to take care of these,' he squawks, thrusting a stack of cards toward you[otherwise]Chucky [one of]busies himself with some arcane cooking implements[or]just stares, with his one glass eye[or]looks like he wants to hit you[or]takes a quick pull from a bottle of vanilla extract[as decreasingly likely outcomes][end if]."

[% Chucky is an homage to the song "Cyclops Rock," whence his name, his one glass eye, his tombstone smile, and his antisocial tendencies. I believe the president he served under must be Nixon.]

The description of Chucky is "Chucky's teeth look like a cemetery built on some old marshland, his glass eye is not the same color as his real eye, and he smells like a butchery, but he is a phenomenal cook. Supposedly he used to be a chef in the White House.[paragraph break]You'd like to find out more about that, but Chucky isn't the kind of guy who likes to talk. To you."

The tombstone smile is part of Chucky. Understand "teeth" or "tooth" as the tombstone smile. The description of the tombstone smile is "You would think if he really worked for the President, he would be able to afford an orthodontist."

The glass eye is part of Chucky. The description of the glass eye is "His real eye is blue-white, but the glass one is dark green. You don't really like looking straight at it, but you guess doing that would be kind of rude anyway.[paragraph break]Chucky has said, for the record, that he lost the original 'in a fight.' When you told this to John, he said 'Yeah, a fight with a fishing pole!' But he might have been joking."

Instead of asking Chucky about something, say "Chucky isn't big on conversation, even with his friends (you assume)."

Instead of telling Chucky about something, say "Chucky isn't big on conversation, even with his friends (you assume)."

Understand "talk to [Chucky]" as a mistake ("Chucky isn't big on conversation, even with his friends (you assume).").

Chucky carries a stack of place cards. Understand "card" or "stack of cards" or "name cards" as the stack of place cards. The description of the stack of place cards is "The papers are place cards, which are to be set out at the dinner table so everyone knows where to sit. The forms of the names are inconsistent: The men are 'John,' 'Miles,' 'Ivan,' and 'Garry,' but the women are 'Miss Idie' and 'Miss O.'[paragraph break]But that's not your problem. Your job is figuring out where to put these."

[% Forcing the player to get the place cards requires a bit of work. Looking back I wonder why I didn't say "Chucky shoves the cards into your hands" and start the game with the cards in your inventory. I guess I thought it was important to let the player screw around for the first turn instead.]

Check examining the stack of place cards:
  If Chucky carries the stack of place cards:
    say "As you lean in for a closer look, Chucky draws back, repulsed by your intrusion of his personal space.[paragraph break]'Just take [']em, will ya?' he growls. He shoves the stack into your hands and then turns to his cooking.";
    now the player carries the stack of place cards;
    continue the action;

Check taking the stack of place cards:
  if chucky is carrying the stack of place cards:
    now the player is carrying the stack of place cards;
    say "Once the cards are in your hands, Chucky spins around and returns to his cooking." instead.

Check going in Kitchen:
  if Chucky carries the stack of place cards:
    say "'Where do you think you're goin[']?' Chucky barks. 'These cards ain't my job.'" instead.

Instead of going nowhere in Kitchen, say "The stairs go down to the cellar, and south from here is the dining room, and those are the only directions available to you."

JikGuard.com, a high-tech security service provider focusing on game protection and anti-cheat, is committed to helping game companies solve the problem of cheats and hacks, and providing deeply integrated encryption protection solutions for games.

Read More>>