Friday, December 9, 2016

FAIR - Postmortem

After last year's Comp, and writing two ambitious games that nobody saw the back half of, I swore that I'd design my next game so that everyone would get to the ending. I'd build it slick like a water slide so people couldn't get stuck if they tried. My brain came up with "explore a tiny space, then answer a multiple choice question about it." There would be no wrong answer, and no puzzles along the way to hinder the player. The game would make no judgement and the player would be free to interpret the situation however they wanted. I also decided the setting would be much more mundane, not horror, more "indie-film bittersweet" and maybe character-based since I'd based all three previous games on situations and mechanics with little regard for anything else. At first in my initial frustration I had intended to troll the Comp hard in the manner of "This is what you want? Here you go!" I also toyed with satirizing the comp with some sort of pie-judging contest where all the flavors of fifty subsequent pies would be randomized and eventually all start to blend together where the player would get bored and just pick one randomly. Fortunately my frustration softened, and I realized I might actually be able to write this and make it somehow about the frustrating process of creating something and having it judged by people whose whims are fickle.


They're fifth-graders, how hard can the science be?

Eventually I hit on setting the game at a science fair for grade school students. I had in mind the kind of quirky, too-smart children one sees at spelling bees and their parents who are involved to varying degrees. Every exhibit would be weird somehow. Nothing would be "perfect" and I wanted the player to perhaps struggle with whether to award the best science or the best personality on display. And even better: what if the player were not even really qualified in science at all? What if they were a an artist who knew all too well the struggle of producing something for public consumption and tasked with judging something they know no more about than any random person? My initial thought was to make them a local celebrity, like an anchor person or a weather person who would be expected to know science things but only to an extent. Since I know a tiny bit more about writing and self-publishing than I do about meteorology, the PC became a self-published science fiction author who is pulled in to sub for the normal judge at the last minute.

There was no specific reason to specify gender, so I chose the pseudonym A.B. Astherton as sufficiently writerly and neutral, specifying it was not the player's real name. I need motivation, so perhaps A.B. is not a particularly good author, and is scraping by doing some sort of Kindle Direct Publishing thing. Perhaps as a local celebrity they can autograph copies of their book—but this is an important thing because rent is coming up. And there's a time schedule because the gym needs to be used for something. A guide character...the principal would be the strict timekeeper because what happens in school gyms after hours? Community theater play rehearsal of course! I wasn't writing the type of game I normally do, so I loaded it with a bunch of potential background elements I have lots of anecdotes and at least a bit of peripheral experience with: theater and writing. And precocious children. I found the concept of a local community theater doing an original rock musical of A HANDMAID'S TALE to be hysterically wrong-headed and funny—so much so that I designed the program to include as a feelie that had the name "Bob McMaitlend" as the writer-composer-director and suddenly he set the tone for the whole thing: He's a liberal principal with ideas. and the guide through the story, like the player, caught in the swamp of Middle America that everyone wants to get out of by producing a book or a musical or an invention to get them noticed.

I wrote a "spec sheet" that was just a list of characters I quickly made up names for and who they were, and what the science projects were about. Who had parents, what the goal was, the structure. This was all done at the end of the 2015 Comp.

And then I got to do something I never ever had the luxury of: I saved my spec sheet on the computer and then spent the entire beginning front half of 2016 not writing the game. I let the characters live in my head, and their personalities develop. I thought about them a lot. For me, this incubation period is an important part of writing an actual story. It might sound like a "duh" thing, but usually I am writing a game on the fly making it up as I go, so having the entire exact scope and structure of the game complete with enough initial ideas to gel and think about for eight months improved my understanding of them and benefited the world-building of FAIR. I knew from previous years I could write a short game really fast so I didn't even begin until one month before the intent deadline hit, making the entire coding process two months.

Making the Game Not-Frustrating

Steph Cherrywell was the first parser author to show off the deceptively brilliant Hybrid Choices extension to its full effect in BRAIN GUZZLERS FROM BEYOND. She used it primarily for conversation, but also to streamline a couple of difficult interactions. One current discussion in IF is "limited parser" games, where an author discards some or most of the built-in interactions because they are unnecessary, or to make a point. Arthur DiBianca's exploratory INSIDE THE FACILITY does this, only allowing movement and EXAMINE, and the player automatically picks up and uses necessary objects when in the correct location. Katherine Morayati's TAKE goes further, limiting interactions to EXAMINE and TAKE. Some fans have grumbled at this, but my own take is that authors should provide controls that are necessary to the player. If jumping isn't necessary in a console game, why should developers need to include it?

My personal philosophy that has developed is to try to keep what's useful in front of the player at all times, even if it does involve rearranging the scenery to assist them. A player shouldn't need to guess-the-verb for a normal everyday process they know how to do. An author can spend time implementing a toothbrush with bristles that are a supporter and toothpaste as a container with varying amounts of paste and a twistable cap that must be removed and a brushing action that only works on teeth and give the player actual teeth and require the player to spend ten turns on their dental hygiene before they're comfortable leaving the house, but does this actually create fun for the player and serve a game that isn't specifically about a dentist?

Hybrid Choices allows the author to switch the game between normal parser and menu/choice mode at any time. Often the best use for this is conversation, but AW Freyr (the extension's creator) helped me with code so I could cause any interaction with specific objects to drop to a choice menu. In FAIR, this greatly simplified the grinding minigame of selling books. Any interaction with the box of books in the hall (EXAMINE BOOKS, TAKE BOOKS, SELL BOOKS, KICK BOOKS) triggers the menu and gives the player a clear set of interactions that might not be initially obvious. Implementing NPC buyers and a selling system and actual books and money would have taken forever.


A grindy mini-game

The bookselling minigame feels a lot more complex than it is. I got reports of people trying to optimize who they sold books to, but there is no actual difference. I gave the player a choice of several fairgoers with randomized features to give a sense of how crowded the fair is without having to build multiple actual NPCs other then a generalized "crowd" scenery object. There are ten questions a buyer might ask, and the number of them they do ask is randomized. Landing on card one means the NPC already has the book and wants it signed and proceeds no further. 2-9 are the "is this like Harry Potter?" type questions. Usually there is a positive answer, a negative answer, and an answer that could go either way. The player needs to get two positive answers and prevent the negative answers from whittling them back down. Another advantage of Hybrid Choices in this situation is that the text of the questions and answers and choices can also be randomized or cycled. Despite only nine variations of a question, I could make repeat views of the same card change so that it seemed there were a lot more responses and variations by using the same choice-pages.

Building the School

I first implemented the entire Hallway (first room) pretty thoroughly with the bookselling minigame, and then sent just that for a round of alpha-testing to make sure everything worked properly. I had done the same last year with the bread-making game and I'm glad I did because it still needed a lot of untangling in updates. My fault for not listening to the testers implicitly, "This is hard." "But it works!" Luckily the choice-nature of the book game was a lot more airtight and just needed some tweaking to remove extra spaces and pronoun agreement and, the bane of my existence, closing quotation marks. I had gotten a "This gets a little boring after 100 turns" comment, but a normal run through of the game I had intended to be around 70 turns. The transcripts I received showed my random generation lists weren't running out of different things to say, so I called it good.

Next I implemented the gymnasium which has lots of backdrop objects. It's a tricky construction because it is one big environment with multiple locations from which the player can see the same parts of it from multiple locations. I over-described it because I wanted the geometry and function of it to be clear to the player and I had a couple of environmental hints that would be occurring. Also, I predicted that many first plays of the game would result in not having seen every exhibit. The choices could vary from "Number 42" if the balloon was still attached and the player hadn't even looked at it, to "The second one from my left" if the balloon was gone, to the complete name of the exhibit optionally with the student's name if A.B. is acquainted with them.

Next I set up five locations for exhibits with the intention of writing the room descriptions later because I wasn't initially sure how to write five interesting variations of "Here's a table on the gym floor with an exhibit on it." Once I figured out to make the table a kind of supporter, and an exhibit a kind of container, I was able to get them all out and fill them with a lot of useless props. Props were a kind which resisted all TAKE efforts to curb standard adventure game kleptomania. The only truly important one was the mouse cage and that was a special item so the roaming twin sisters wouldn't steal it.


Come and play with us...A.B....

Oh yeah, the sisters. I had an idea for two little girls going around unsupervised vandalizing the exhibits and the idea of their efforts filling the rafters with balloons that had been tied everywhere. I wrote them as one NPC, which made them in my mind like the creepy girls in THE SHINING, but I put my evil little girls in yellow. Eventually I went back and added that they stole objects on occasion as an extra thing to keep them from cutting all the balloons in the first 20 turns. The little girls are the only NPC that actually moves freely on the map in the exhibit area; McMaitlend is a series of choice-menus that pop up and go away, and his NPC is never actually there until he shows up on the stage 15 minutes before the ceremony. Every NPC that seems to move is teleported, entered, and exited via code. One early idea was that the five entrants and their various parents would also move around and have some limited interactions with each other, but I pictured them all jamming up in one corner unrealistically and decided with all the rest of the chaos it made more sense to the player that they remain with their exhibit instead of having to be hunted down.

Cover Art

I almost always design cover art for a game early to solidify a vibe. I wanted the logo to be simple and inviting but not specifically childlike. It would be cool to foreshadow some irony as well. I found a font I liked and tried all manner of additions to specify a science fair, finally hitting on a red balloon replacing the letter I in the title. When I lassoed the original dot over the I and moved it out of the way to position the balloon, the dot happened to land in place as if it were a period, making the word "fair" a declarative finality which felt correct. It gave me the irony I wanted—the dot didn't get to do what it originally planned, being usurped by the prettier balloon, but the dot still has use. Maybe that's too subtle, maybe overthought; it worked for me.

(A week or so after the comp opened, I got a comment about my "half-assed" cover art. The overall quality of cover art this year had been greatly written about, so I grumped about the comment for a bit, but then worked on the design with the help of the private author forum and actually came up with something I was happy with. I hadn't wanted to go literal with "stick the title in a science fair project" but I was encouraged to try that, and by adding human silhouettes and a backboard that were close to monochrome, it framed the title a bit better and added another layer to showing the concept.)

Dialogue with Characters who co-write

I left the exhibits and fleshed out most of the rest of the map, dreading the dialogue writing process because I knew I was going to have to spend lots of time with the conversation structure and filling it in. It did take quite a while and I would switch from writing for a character to fiddling around with the scenery when my eyes glazed at choice descriptions and page-switch rules and page-toggle rules and "It is one-off" "It is dead-end" It is an end-page" decisions. The thing that saved this was the incubation period. Despite the tricky process of linking choices and pages, the characters had lived in my mind and were formed enough that they all had interesting and unexpected things to say. I know I'm in a zone with characters when I don't have to drag dialogue out of them. They "tell me" what to say. The "ghost writer" plot wrinkle came out of nowhere in the dialogue from Stephanie and then continued with Lorraine. It was a completely fitting story element that I had no idea was there until I wrote it and it magically fit into the story as if I'd planned it. (Saying that my characters do things I don't expect is a little schizophrenic-sounding, but I believe this quirk developed primarily from my performance background with improv training and I'm acting out the character on paper myself. If you let characters live in your head long enough they'll start to talk to you, and I've learned they resent not being listened to. Their own dialogue suggestions usually are better than my own.)

A happy finding was that having an exhibit, a character, and potentially a balloon in each exhibit location pretty much made up a room description on its own, so I didn't need to write five versions of "You're in another part of the gym..." I implemented an exit-lister response to going a nonexistent direction that seemed to work well. In the midst of writing lots and lots of dialogue, I implemented the helicopter cutscene onstage, and Lorraine's smoke break. They both were professional NPCs and both sequences went in quickly with minimal fuss due to making them choice-menus. I appreciated how they both felt like major events even though they were specifically text-dumps that could have been done without any interactivity.

XYZZY

I always implement an XYZZY command, half out of worship for Infocom, and half because almost every game deserves a cheat code or an Easter egg.  I can always find something interesting to do with it. In this case, I made it reset the clock to 6pm so as to provide the player more time to do whatever they wanted to do. This had the effect of making the principal repeat his opening sequence where he gives you two tickets to his play. I decided it would also be funny if the player ended up accumulating tickets each time, so I re-did the theater ticket object to keep track of how many the player is carrying without making each ticket a separate object. Then after about eight of his text dumps I decided it would be hilarious to make him vaguely aware of repeating himself, and this let me streamline the dialogue down to nothing so the player wouldn't need to read it again. One of my testers had mentioned that they wished they had a way to avoid giving a book away for $10 instead of $20 dollars when a fairgoer was aware of the price on the Bookburn website. I added an option to sweeten the deal with theater tickets and keep the price at $20—and now that the player had a potentially unlimited supply of them, it solved a complaint and was a neat solution to a non-puzzle.


Getting to the End

At this point I decided I had to write the endgame. Poor Amber still didn't have dialogue but I needed a break, and I needed to work out how the awards ceremony sequence would operate. My original thought was just to chunk it out scene by scene, award by award and have five choices for fifth place, five choices for fourth place...using a choice-switch rule to flag if an entry had already been chosen to remove it. I started tediously implementing this and then decided there had to be a better way. One of the magical fun things about Hybrid Choices is it initially feels backwards. Instead of a page with choices that point at a series of other pages, pages have descriptions that hook to the previous page. The brilliance of this is you can have a page with text and a choice description that can hook to any number of other pages, and via rules show or not show based on the current game situation. I quickly backed up and wrote one page with the entire awards ceremony progressing with cycling text, then hooked all the pages with the winner's scenes to it, allowing them to disappear via a rule as they are used up. This was great. I actually made a second section structured exactly like this for the winner, so the winner's acceptance scene could differ from their acceptance if they didn't get first. This worked great until I tried an UNDO and it completely knocked the sequence out of sync. The cycling ceremony text continued and chosen winners still vanished. I fixed this by diving into the Inform documentation and learning how to disable UNDO which I know people haaaaate. I was already planning an Easter egg uber-ending for anyone with the persistence to play and see what happens when every entrant wins, and figured people would UNDO to accomplish this.

Dreaded Overscoping

With the game nearly completed and about 5 days to go, I was confident of finishing and started to consider adding some frosting. I had developed this magical-realism Easter egg of manipulating time and (IMO) hilarious reactions to it, so I wondered how cool it would be to add an actual time machine into the mix? I may have even said out loud "A time machine shouldn't be too hard to throw into a game a week from release!" It could come from a discarded science project, and determined players who found it could zip all over the game manipulating events how they wanted in defiance of UNDO prevention! I figured that the player could forward and reverse time between important story event nodes, and lots of new scenes popped to mind: The player could time travel to before the beginning of the game and actually decline to judge the science fair at all and we could meet the cats that were referred to in A.B's bio blurb. If the player did accept the opportunity to judge, the game would just restart. If the player fast-forwarded past the end of the story without picking a winner, they would be struggling with their next manuscript. This scene could change based on the winner. If Gertie won, the player would get to read the ending of the fourth novel which involved sentient immortal mice. If the player accepted the bribe, the novel would be the ending of "Stephanie's" book "...and I learned that even I, an eleven year old girl could do my part to change the world as long as I put in the work and kept to it. I hope to inspire young girls all over the world to work for their Republican..." yeah. It would be epic. I was very excited to lift the mundane plot into magical-realism and have a whole hidden extra meta-game hiding similar to how BAKER OF SHIRETON worked.

I got the game as initially scoped reasonably complete and sent it to my testers two days before the deadline. (Chandler Groover proved invaluable in providing an exhaustive list of comma splices and extra spaces and forgotten closing quotes. If you encounter a typo it is NOT his fault!) Now I set about implementing the time machine. One monkey wrench got thrown in that I had two days left before the submission deadline, but the last one was taken up because my mother broke her wrist and had to have surgery. I might get a couple hours to polish a bit, (post-surgery the apartment would have to be entirely rearranged to accommodate her lack of working fingers) but that day was effectively lost. If I was going to make the time machine work, it had to work and have time for beta testing. I started in the afternoon and actually had it implemented and working in prototype form by about ten PM. If it worked, I'd have to write five or six more minor scenes for each version of the ending. There was also an uber-epilogue to write. Usually the time machine is stolen when the player left the school with it in inventory. I worked out an actual puzzle that if the player stashed the time machine in the box of remaining books and left it in the school, McMaitlend would dutifully mail the box to the player in the future, and the player could use it one more time to rewind (the fast forward button is now stuck down and nonfunctional), most likely expecting to land in the fair again. But this time, the player would rewind to 1997, be living in England as a successful author, and read the NYT Review of Books story about how the debut of their ninth and final novel in the Unknown Colors of Space series (which they had now gotten an extreme head start on) bumped upstart new author JK Rowling's Harry Potter and the Philosopher's Stone out of first place on the bestseller list, changing the course of their career and popular juvenile fiction forever. I thought it was a really neat payoff for all the Harry Potter annoyance the player had to put up with.

Smacked Down by the Real Life

I spent my last weekend afternoon working the time machine and had it implemented and working in prototype fashion. By 2am I had halfway discovered every single way the game could collapse into bits with paradoxes and spectacular inconsistencies and bugs. I might have made the time machine work before the deadline, but at the expense of not having time to write all my new planned scenes it provided for, and not enough time to beta test this highly complicated thing that broke the game pretty consistently. At 3:32 AM I had the black moment of despair valley common to every project: it wan't going to work. I couldn't submit this. I so loved the concept but I didn't have any time to make it work. I could withdraw and wait for another year and make it even better but it was such a letdown. Plus the time machine code was so interwoven with the entire game and written in with fixes and elements that needed to stay (Amber's dialogue!) that I couldn't just revert to a previous version. I would need to spend a significant amount of time removing every bit of time machine code. So after feeling horrible until 3:48 AM and needing to wake my mom for surgery at 5:30 AM, I could A: Sleep for almost and hour and a half before I had to wake up again and hope I had time to weed out the time machine code, or B: Skim through the entire source and extricate the goddamned time machine while I remembered what all the lines were. It was one of those "you're a grown-up, snap out of it and get this done" moments, and a very long 48 hour timespan without sleep.

The More You Know

In the end, this proved a culmination of my learning experiences with previous entries; I was trying to fall back in my own pattern of writing so much code that nobody would see, violating my own initial resolution that EVERYBODY WILL SEE THE ENDING. I left the time machine object in the game, and then decided that it would clue the use of XYZZY. I still wanted to give players an opportunity to work the game over. Intially the ceremony was the end of the game, but I added in a brief epilogue of the player waiting for their ride after the ceremony so the player can XYZZY again and drop right back to the choice of winning exhibit without playing the game through four more times.

I also loved the idea of XYZZYing back to before the game started, so I wrote that small scene and slipped it into an early update after the comp started. I figured only the most hardcore of hardcore puzzlers would try XYZZY on the very first turn of the game and that nobody's primary gameplay would be affected by it. It is an amuse-bouche that wouldn't lose or gain score points.

I was exceedingly pleased that Fair placed 7th in the comp, and doubly proud I broke top-10 in a year with the most entries ever. I know there are a lot of intricacies I haven't discussed, but this has gotten to over 4000 words. Feel free to leave a comment with a question if there are any other elements of Fair you'd like to me to answer or discuss in detail.




2 comments:

  1. Dude! Hopefully you didn't throw away the time machine code version! You should work that back in, sounded awesome. Great game by the way.

    ReplyDelete
  2. I'm glad you liked the game! I didn't save any of the code (I was literally just deleting lines as I went) but you can pretty much do everything the more complicated time machine would have allowed except jump forward. You can get unlimited time to peruse the fair, you can jump back after the ceremony and make new decisions, and you can re-trigger both the Senator and Mrs. Vanden-Botten's scenes by tearing up their respective checks and rewinding to the beginning.

    I was sad to lose the JK ending and the different variations on the next novel would have been fun, but perhaps I can use them if I ever do a sequel. (? :) )

    ReplyDelete