The Art of the Text Adventure

Page 1

The Art of the Text Adventure: A Guide to Building Text-Based Games With Python Chapters: 1. A Fitting Background (some information before you get started) a. The appeal of a text-based game as a learning tool. b. The appeal of Python as a first language. c. Setting up the environment. 2. A Vivid Description (how to use Python to describe the scene) a. Printing out a scene description. b. Using Timing for better gameplay. 3. Creating a Personalized Experience (capturing information from the player) a. Getting user input to personalize their character. b. Using string variables to store that input. c. Printing out stored information with formatted strings. 4. Two Paths, Diverged (letting the player make some decisions) a. Using if, elif, and else statements with input to actually implement gameplay. 5. Materialistic Pursuits (giving the character some health, cash, an inventory, and other information) a. Using variables of other types (integer, float) to store information about the character. b. Using lists for inventory storage. c. Using dictionaries to more easily describe a character. 6. A Forgiving Attitude (allowing for user error in inputs) a. Using booleans & while loops to make sure that input is valid. 7. Keeping A Detailed Account (printing out information about the character) a. Using a for loop to tell them everything in their inventory. b. Using .items() to give them character information from a dictionary. 8. Algorithmic Practices (creating reusable code for easier game creation) a. Using functions for different monotonous tasks. 9. Class Structure a. Storing the whole game in a class, because it makes more sense. 10. A Final Reflection a. Going over what we learned. Bonus Sections: 1. A Turtle Talker a. Printing slowly, character by character.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.