Athenian Summer 2020 Programming a Text Adventure Game with Python
Class Description
The Python programming language is used for data analysis, computer vision, creating games and websites, and much more. We will use Python to create a text adventure game, learning about:
- Communicating with the user (
print
,input
) - Taking action depending on conditions (
if
) - Looping (
while
,for
) - Making events happen randomly in games (
random
module) - Storing data in various ways (
tuple
,list
,dictionary
)
Course Materials
Class Plan/Log
July 6
Introduction to Python
Writing a Text Adventure Game
repl.it
Log in with a Google or other account
Demo of the Ship Game
Play the simple game
Modify the game
Homework
- Download and install JetBrains IntelliJ IDEA Ultimate Edition
- Start with the free trial with IDEA and then go to the JetBrains Products for Learning
page and get a free student license
- Select Apply With Official Document
“Add any official document(s) (e.g. student card) certifying your affiliation with your academic institution or provide a link where such information can be found”
- Select Apply With Official Document
- Start with the free trial with IDEA and then go to the JetBrains Products for Learning
page and get a free student license
You will be much more productive working with IDEA than with repl.it.
July 7
Getting IDEA Running
- install Python if needed from Python.org
- download
- install
- Choose evaluation
- Don’t send usage statistics
- Don’t import
- Go with defaults
- Don’t create script
- apply for license
- install Python plugin
- Create a new project from version control
- Choose git
- Choose to install git if it offers the option
- Paste in this URL: https://github.com/dcbriccetti/python-text-adventure
- Choose git
Learn Some Python Basics
print
input
int
if
Work on Adventure game
July 8
- Share Game Plans
- Get the Game Engine Updates
- Solve Code Problems
July 9
Get the Game Engine Updates
- Copy your existing code from simple_game.py into the clipboard
the entire contents of
student_game.py
(Cmd+a or Ctrl+a), then paste. -
Run
- Solve Code Problems
- Dump your game into shared document Text Adventure Game Plans
- Learn More Python Basics
July 10
- Solve Code Problems
- Get IDEA Installed
- Dump your game into shared document Text Adventure Game Plans
July 13
- Learn More Python Basics
- Solve Code Problems
- Get IDEA Installed
- Dump your game into shared document Text Adventure Game Plans
July 14
- See New Engine Features
- Else events
- Another activity example
- Solve Code Problems
- Get IDEA Installed
- Dump your game into shared document Text Adventure Game Plans
July 15
- Computer Science Teacher’s Association 2020 Conference Levar Burton appearance
- Next Week’s Programming Electronic Music Class
- Solve Code Problems
- Get IDEA Installed
- Dump your game into shared document Text Adventure Game Plans
July 16
- Learn More Python Basics
- Defining and calling functions
- Solve Code Problems
- Get IDEA Installed
- Dump your game into shared document Text Adventure Game Plans
July 17
- Learn More Python Basics
- Defining and calling functions, review and practice
- Adding activities
- Fortune cookie
- Joke of the day
- High/low guessing game
- Roll dice for points