Yorkville High School Computer Science Department
Yorkville High School Computer Science Department on Facebook  Yorkville High School Computer Science Department Twitter Feed  Yorkville High School Computer Science Department on Instagram

Yorkville High School Computer Science

ASSIGNMENTS: Adventure Game - April 4, 2017 :: Game Story - April 6, 2017 :: Game Art - April 21, 2017 >>

Computer Programming I :: Projects :: Adventure Game

Rubric
Lesson
Example
Due: Apr 4

Problem

You are going to create a simple game where you make choices about where to go next. Along the way there will be items you can pick up that you will need later on. This project will be completed with a partner and the two of you will take turns coding and evaluating the code.

Create a flowchart for the game that includes what will happen in each area. Things you should include in each segment of the flowchart are what items are found, what the image looks like, what buttons are visible, and the text of the buttons. Click on the flowchart below from one of the original text-based adventure games, Zork, for an example. Note that the Zork flowchart only includes the items and paths. You will also have to include a description of the area and the buttons.

Zork Example Flowchart

You must be able to go to at least 5 different areas using ifs and else ifs.

You must include an item that can be picked up and used at a later point. You will need to include an if statement inside another if statement to do this, which is called a nested if statement. Look at the example code below to see how this is done.

if (btnChoice1.Text == "Fight The Boss")
{
    if (sword == true)
        btnChoice1.Text = "Use The Sword";
    else
        btnChoice1.Text = "Use Your Fists";
}

Use and (&&) or or (||) in some of your if statements. You could do this by having multiple items you can pick up and then combining them like the example below.

if ((sword == true && shield == true) || fireRod == true)
{
	btnChoice2.Visible = true;
	btnChoice2.Text = "Deflect The Attack";
}

Specific Requirements

  1. Have an image that changes every time you go to a new area. You can change an image in the following way: picName.Image = Properties.Resources.image where image is the name you gave the image when you added it to your project and picName is the name of your PictureBox.
  2. All of your code should be in a series of buttons that appear and disappear using the Visible property as they are needed. Use btnName.Visible = true to make a button visible and btnName.Visible = false to make a button invisible.
  3. There should be at least two items you can pick up along the way that use boolean variables.
  4. There should be at least 5 different areas you can visit.
  5. The end of your game (whether it is a game over or a victory) should have two options: "Try Again" or "Quit." Try Again should reset the game using Application.Restart() while Quit should close the Form using the code this.Close() or Application.Exit().
  6. Determine a good name for each variable following the rules.
  7. Rename the form and all controls on the form.
  8. Add color, font styles, and at least one picture to make your program look nice.
  9. Your code should be commented, and your comments and code will be evaluated by your classmates. Make a copy of this Google Sheet to use for other groups to evaluate your game.

Tips

Yorkville High School Computer Science Department on Facebook Yorkville High School Computer Science Department Twitter Feed Yorkville High School Computer Science Department on Instagram