Project Four - Adventure

In ages past, computer games didn't use graphics:  they used text.  This created a genre of early role-playing games that stemmed from branching "choose your own adventure" type stories to free roaming text-based role playing games (such as Zork) that responded to complex user input.  With this project, you'll get a brief lesson in this history of gaming by making a choose your own adventure game.

Mission
Create a simple "choose your own adventure" game.

Details

Your program will present the user with a "scene" from which they must make branching choices.  This could be done in a variety of ways:

  • Describe a room to the user, he must "move" into a area by going [east] or [west] or by choosing "upstairs" or "door"
  • Describe a problem to a user, he must decide to take a certain approach like [talk] or [fight]
  • Describe an object to a user, he must decide to push the [green] or [red] button
Your program will depict at least ten "scenes."   Many of these will be an endpoint to your game, either positive or negative.  Many will have choices of between 2-3 options to continue.  You can use any pattern of choices, so long as a scene has either 0 choices (an ending) or 2-3 choices (a branch point).  A user should never go back to a previous scene.

This beautifully drawn diagram shows the flow for a typical project. Numbers are scenes, arrows are choices.  White numbers are scenes which present choices.  Grey numbers are "game over" or bad end scenes.  The yellow number represents the "winning" ending for this game.



Example Program

You wake up in your room.  The sun is shining through your blinds.  It is quiet, peaceful.  Your alarm never went off.  Oh no!  8:11.  You're late for school.  What do you do?
   Get dressed and [rush] to school
   Relax and have a tasty [breakfast]

If the user chooses breakfast
You choke to death on a waffle.  Stay in school kids!

If the user chooses school
You arrive Middletown High  by 8:27.  You are wearing pajama pants, suspenders, and a My Little Pony T-Shirt.  You must have gotten dressed very quickly;  you aren't even sure you own all of those things.  Do you want to stop by your locker first, or head directly to Mr. Malafarina's class to maximize coding time?
     Go to your [locker]
     Time to [code]

If the user chooses locker, present a new situation to the user
If the user chooses code, present a new situation to the user
and so on.

EXTRA CREDIT

You can create a more elaborate, complex, or particularly well written adventure program.  If you do so, you may be awarded up to two points of extra credit.  Be creative!

No comments:

Post a Comment