Choose Your Own Adventure

posted by: Ms. Martin 3 April 2011 No Comment

You will write a text-based adventure game in Python. The story line is entirely up to you, so have some fun with it!  In a text-based adventure game, information about the state of the world is printed out to the user and the user is given options to act.  For example:

West of House
You are standing in an open field west of a white house, with a boarded front door.
There is a small mailbox here.

What would you like to do?  1) Go North 2) Go West 3) Open mailbox
3
You open the mailbox and see mail...

 

Goals
You now have quite a bit of Python under your belt and it’s time to put it all together and consolidate your knowledge before moving on to even more exciting things.  Specifically, this is a good exercise for making sure you are very comfortable with the idea of Python ‘container’ statements that control other statements (loops and conditionals).
Adventure Ideas
  • A day at Garfield
  • Solve the robbery
  • Journey to another planet
  • Find the treasure
Requirements
- The story must be appropriate
- Your program must have a comment at the top
- There must be something the user can type that always exits (“Quit” or “bail” or “get me out”) …
- You must use at least three variables (Name, age, score, shoe_color, number of jewels found, number of classes stayed awake in…)
- You must have at least one complex condition (If my health is less than 5 and I get attacked by a bear, I die)
- There must be at least one way to die and at least one way to win (Save the princess, get the date to prom, get eaten by a dinosaur, eat poison)
- It must be possible to keep playing the game forever (type ‘again’ to play again)
- There must be at least one “puzzle” the user has multiple tries to get
What is 2 * 5? 3
No, try again! 6
No, try again! 10
Please try to make it more fun than multiplication!

 

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading ... Loading ...

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>