Adventure quest game programming task

Create a program that does the following:

  • Uses the existing code below and expands on it to create an adventure game
  • The user should have a choice (although limited) of where to go in the story EG left or right and what to do
  • The adventurer should be able to complete at least 5 options (as a bare minimum) before completing the game

Remember

  • The story can be about anything you like – you don’t have to use the story here.
  • Think about interesting things that could happen along the way – there are some ideas below:
  • Perhaps you could have to play a game with someone you meet along the way?
  • Perhaps your character has health and interactions with certain characters can cause you to lose health
  • Perhaps some things in your game are random – EG the amount of health taken from you if you lose a battle or the effects of drinking a potion
def intro():
   direction = input("You are at the start of a big scary forest. Do you want to turn left or right?")
   if direction =="left":
      left()
   elif direction =="right":
      right()
   else:
      print ("That isn't a valid option")

def left():
   print ("You turn left and you see a monster that eats you.")
   print ("The End")

def right():
   print ("You turn right and see a house in the distance.")
   #Continue the story and code here!


intro()

Challenge

  • Allow the user to hold and use items in an inventory as they collect items in the game
  • Allow the user to export their adventure to a text file
  • Allow the user to save their game at any point and load the game where they left it

Success criteria

  • The program is written using procedures or functions
  • The program uses Python lists or arrays
  • Use of suitable loops where necessary
  • Contains suitable prompts for the user