Contents

Overview

In the early days of gaming, text-based adventure games were pretty typical. In many of the classics, like Zork (you can see some other examples here), the game begins with a description of your character's current surroundings in whatever fictional world the story takes place. Then you are prompted to do something by entering some free text. You aren't given any options; you have to wing it and type in something like "go south" or "pick up [object]" and see if the command is interpreted. Through these free-text commands, you can navigate through and interact with the world.

Some simpler examples of text-based games can be found at ChooseYourStory.com. Click one that sounds interesting and give it a shot. These are more similar to what you will be doing for this PA.

The main gist of a text-based adventure game is that there is a story line consisting of a series of situations in which you can change the story's path—just like a choose-your-own-adventure book. While many of the old games used free-text to interact with the world, you will be providing a menu listing possible choices.

For this assignment, you'll create your own adventure game in which the player's character must navigate a world, deal with obstacles, fight off opponents, and make it to the end (whatever that might mean). You will need to come up with a theme and a plot. In the past, students have done SciFy themes (wizards, space, etc.), as well as current-day themes (one student did a mall shopping fighting game, where the main character has to battle it out with other shoppers for sales and haggle for prices). What you choose is up to you, as long as it's appropriate. I'll give you feedback on your first milestone so you know you're on the right track.

(Back to top)

Specifications

Your completed PA must have at least the following components (you're welcome add additional features to the game!):

Extra credit

If you have programmed before an you feel that you'd like to try something more challenging, than try out one or more of the extra credit components below.

EC 1: Save game state (3pts on completed project)

Make it so that the player can save the game and exit, then pick back up right where they left off. You should use files to store the game state. The player should also be given the option to start a new game or load a game from the a specified file.

EC 2: Load scenes from a file (5pts on completed project)

Rather than hard-coding all of the scenes, write code that can load and process a file with all the scene descriptions, choices, and actions to take based on a choice. This is a pretty challenging task, but something that would be great for anyone who has a class or more of prior programming experience.

(Back to top)

Milestones

Milestone 1: Design sketch

For this first milestone, you should submit a design for your program. For this, you will use Twine, an open-source tool for telling interactive stories. We'll go over in class how to use it. You'll need to create a new store, then add one passage for each scene. While you only need three scenes for this PA, you should plan several more for PA1.1 as you will end up implementing additional scenes in your C++ program for the later PAs. Adding extra scenes will make for a more compelling game.

The first passage should include the theme and back story for your game and what stats will be kept track of during the game. The others should include the basic text for your scene (this can be rough right now). They should also include choices for the player to make and links to other scenes (to make a link, it looks like: [[choice description |Title of scene to link to]]). Next to each choice, note which stats will be affected (each choice must affect at least two stats!) and by how much.

Publish your story to a file (publishing will cause twinery to download a file with a .html extension to your computer) and upload it here. You can view the rubric here.

Milestone 2: Skeleton + Pseudo code

Pick one of your scenes with two choices. You will write a C++ program that will handle this scene and the two scenes it leads to (so three scenes total).

Create a well documented code skeleton. You should have a header at the top with all relevant information (see the Style Guidelines), comments above main explaining what it does, and pseudo code comments inside of main describing the steps in your program. Your pseudo code should address all of the specifications listed above. Your program should compile.

As an example, one chunk of pseudo code might look like this (this is very incomplete!):

Submit your .cpp file here. You can view the rubric here.

Milestone 3: Completed assignment

Complete your program in an incremental fashion. Ensure that it compiles and runs after each feature you add.

Submit your .cpp file here. You can view the rubric here (it's a different rubric from the previous milestones).

(Back to top)