Programming Assignment 1: Adventure Game
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.
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 submission must have at least the following components (you're welcome add additional features to the game!):
- an interesting, fun storyline that holds together well
- some way of winning (should display a "YOU WON!" message)
- some way of loosing (should display a "GAME OVER" message)
- some notion of the following player attributes (which should be given
reasonable starting values):
- first name (one word, prompt user for this)
- last initial (one character, prompt user for this)
- health level (whole number)
- alive/dead status (boolean)
- score (whole number)
- gold collected (or similar energy/power/money source, whole number)
- battles fought (whole number)
- battles won (whole number)
- fraction of battles won (decimal from 0 to 1)
- all player attributes should be printed in an easy to read format:
- at the start of the game
- after each scene
- at the end of the game
=========================================================================== Name: Hank F Health: 90 Alive: yes Score: 130 Gold: 5 Battles fought: 4 Battles won: 3 Win rate: 0.75 ===========================================================================
- at least three different scenes, each with a set of two or more options
that each affect at least two of the player's attributes; scenes can be
battling enemies, interacting with objects, picking up gold or other items,
etc.
Example event:You walk down the path through a dark forest. A goblin pops out from behind a tree! You have three options, which will it be? * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * (a) fight the goblin (b) turn and run (c) try and trick the goblin to let you pass * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Your choice: _
Example consequence: picking (a) causes the player to win a battle and win points, but loose 50% health, (b) causes the player to trip and fall to their death (loosing all health and dying), and (c) not only works but the player gets 50 gold coins the goblin handed over and an increase in points - if the player enters an invalid option, tell them so and then quit the game (we'll learn how to deal with this in PA2)
Milestones
Milestone 1: Design sketch
For this first milestone, you should submit a design for your program. I'm pretty flexible on what constitutes a design: it could be a sketch done on paper, something more formal done in PowerPoint (or the like), or even just a simple text file. Regardless, it must be easy to read and follow and must include at least the following information:
- your name and date
- what the theme and backstory for the game is
- what the scenes are, including what text (roughly) will be shown
- what the choices for each scene are
- what will happen for each choice, including:
- what player attributes will be effected and how
- what scene that choice will lead to
Submit your sketch in PDF, txt, PNG, or JPG formats to here. You can view the rubric here.
Milestone 2: Skeleton + Pseudo code
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 inside of main describing the steps in your program.
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)