Early Text Game Project

In this assignment, you combine while loops, if/elif/else logic, and nesting of code.

(A later text game project will require additional coding ideas,  but this game will give you a chance to be creative using the tools you have so far.)

Requirements:

  • Create a game with a main menu and two submenus. Each of these menus uses a while loop to let the user keep choosing actions until they leave the menu.
  • Each menu needs to include one user input followed by a series of if/elif/else branches. Use a minimum of two elif branches in each series.
  • Include “quit” and “help” commands in each menu. In general, try to make it easy for the user to figure out what they are supposed to do.
  • Use variables to store information about the game as the user makes choices. For example, you can have variables to store money, health, a score, hunger, number of items collected, and so on.

Examples of things that can happen in your game:

  • Acquiring items
  • Buying and/or selling
  • Playing a randomized game of chance
  • Answering questions
  • Looking at things
  • Getting upgrades
  • Gaining experience or score points
  • Completing a level or area and moving onto another one

Some types of game that can work:

  • An economy / business game such as a lemonade stand or a stock market simulation game
  • A mystery game where the user looks at clues and collects items to solve the mystery
  • A turn based combat game involving health points, damage, and so on
  • A game with different areas to explore and things to look at and collect
  • A puzzle game with words / letters / numbers
  • A choose your own adventure story
  • An escape room
  • Oregon Trail style game
  • Prodigy math game style game