Adventure Book

version 1/110101 by Edward Griffiths

  • Home page
  • Beginning
  • Previous
  • Next



  • Section: Pages Without Choices

    Sometimes we'll want to direct the story to a particular place without requiring (or allowing) the player to make a decision. If this is the case, we'll follow the description of a page with the sentence "It is followed by [the name of a page]." instead of a list of choices. For example:

        The First Page is a page.
        "The directions have taken you through miles of back roads to an angry-looking house with chipped blue paint and foggy windows. Is this really Melissa's house?"
        It is followed by The Driveway.

        The Driveway is a page.
        "You are standing in the driveway of what may or may not be Melissa's house. What is your next move?"
        A choice called ...

    After the game prints the text for The First Page to the player, it will automatically continue on to The Driveway without any input from the player and continue reading from there. The chain can be as long as you'd like, with any number of "It is followed by..." statements.

    One practical use for dividing up the action like this is that it allows us to return to the page called The Driveway and take further action there without reprinting the description of the player's initial arrival; if the player has been exploring the grounds for a while, the directions that brought him there aren't likely to be on his mind anymore. In more traditional Adventure Books, it may simply be a convenient way to join convergent plot lines together -- forcing paths through the plot to meet at a particular place.

    Another useful behavior is for a page to return to the page that called it after it is read to allow the player to make a different choice. This is done by replacing the list of choices with the sentence "It is a dead end." For example:

        "Stranger at a Party" by Edward Griffiths
        
        Include Adventure Book by Edward Griffiths
        
        The First Page is a page.
        "You find yourself lost in a throng of revelling strangers."
        A choice called TheFirstPageA is for The First Page. "Talk to the gentleman by the drinks." It triggers NoReply.
        A choice called TheFirstPageB is for The First Page. "Talk to the guy by the stereo." It triggers NoReply.
        A choice called TheFirstPageC is for The First Page. "Talk to the man sitting on the couch." It triggers NoReply.
        A choice called TheFirstPageD is for The First Page. "Talk to one of the guys sharing stories in the corner." It triggers Your Friend Jake.
        
        NoReply is a page.
        "He casts you a withering stare."
        It is a dead end.
        
        Your Friend Jake is a page.
        "When you approach the guys in the corner, you're surprised to find your good friend Jake. Did he say he was coming to this party?"

    When the player selects an option that triggers the page NoReply, he'll be given a discouraging message and prompted to pick a different option from The First Page.

    There are a number of uses for this sort of behavior. In a traditional Choose Your Own Adventure book, it was sometimes necessary to tell the player that there was something wrong with a choice he made and to force him to go back and try it again; this would allow us to send the player back without needing to know which page he came from. This is also useful for creating choices for smaller actions that don't drastically change the plot; "Take a closer look at the old oak tree", for example, may trigger a page that describes the tree in detail, but, since it doesn't open up any new choices for the player, it sends him back to try something else.

    It's worth mentioning that the author is allowed to string together a long chain of pages with "It is followed by..." statements and then to declare the last one to be a dead end. In this case, the program will flip back to the last page it read that offered the player a choice.

    Finally, sooner or later, every story reaches its conclusion. To end a story, simply replace the list of choices with the sentence "It is followed by The Last Page." The Last Page is a special page defined by the Adventure Book extension which does nothing except to offer the player choices to restart the game, restore a saved game, or quit. For example, here is a page that ends a story:

        Drinking the Poison is a page.
        "You bring the bubbling brew to your lips and take a long drink. It burns your throat and suffocates you. You feel faint...
        
        *** You have died ***"
        It is followed by The Last Page.

    When Drinking the Poison is read, the following text is displayed:

        You bring the bubbling brew to your lips and take a long drink. It burns your throat and suffocates you. You feel faint...

        *** You have died ***

        X) Restart
        R) Restore
        Q) Quit

        >

    Using The Last Page to end a story is recommended, but optional. There is no reason why you can't create your own game-ending pages.

    This is all you need to know to create a functioning Adventure Book game. The next chapter will demonstrate some advanced features.