Python Text Game Project

Create a text based game!

General Requirements:

  • Gather input from the user – this input should affect the course of the game.
  • Give your game some flavor: story / topic / theme / setting
  • The game should play differently if you replay it – add randomness or multiple ways to play.

Possible Types of Games

  • Text Adventure / Role Playing Game (RPG)
  • Business Simulation Game – grow your business and make profits
  • Stock market simulation – pick stocks and hope they grow
  • Survival game – stay fed and watered and avoid dangers
  • Oregon Trail style game – survive a treacherous journey
  • Escape room – solve a puzzle to win the escape room
  • Sports simulation – simulate a season, or be the GM, or pick plays
  • Word games / math games
  1. Choose a type of game.
  2. Brainstorm ideas for the features, flavor, and mechanics of the game.
  3. Make a To Do List of things you can add to the game.
  4. Pick the simplest item on the list and start programming.

Level 2 Requirements:

  • Uses input() to get user’s input
  • The game proceeds differently depending on the user’s responses
  • Uses if/else logic
  • Code is divided into functions
  • Uses lists and/or strings in the game logic
  • Uses loops (for and/or while)

For a better grade:

  • Some functions have input parameters and return values
  • One function is called from within another function in some cases
  • Avoids use of global variables
  • Uses more complex if/elif/else logic when needed
  • Uses for loops to traverse strings and/or lists
  • Uses while loops in appropriate situations, such as forcing user to provide a valid response
  • Defines a class and creates one or more objects of that type
  • Game interface is easy to figure out for a new player
  • It is possible to win and lose the game
  • The game has some replay value: it doesn’t play out the same way every time.
  • The game is interesting and fun.
  • The game has been tested to make sure it is bug free.

Do not plagiarize an existing game. Handing in code from the internet or another source is plagiarism. It is cheating.
Your game needs to be your own game. It can be based on a game that already exists, but you need to write the code on your own.

Choose your game wisely so that you can think of ways to include all of the required code concepts.

Create a feature backlog and keep working on making improvements until you run out of class time.

Start very simple. Begin by creating a testable fragment of a game that compiles and runs as expected. Increase complexity in small steps as you add features.

Add Comments (use “#”) in Your Code:

  • Title of Program at top
  • Author Names at top
  • Briefly describe the purpose of major functions
  • If the game doesn’t run when “run” button is clicked, give instructions to start the game