Figuring out what Python's error messages mean can be kind of tricky when you are first learning the language. Here's a list of common errors that result in runtime error messages which will crash your program.
True is the opposite of false. Up is the opposite of down. What is the opposite of dog?
This post goes into the details of how you can add a "save game" feature to your Python games.
To figure out bugs in your code, you might put in
print() calls to display the value of variables. Don’t do this. Use the Python
I made a twitter bot that checks every hour for someone who has asked the question, “Why do homeless people have dogs?” and automatically replies, “Because a dog will love you even though you are homeless.”
CircleMUD was a popular piece of server software for running a MUD, and it came with a sizeable virtual world (which the admin could modify/append to customize their fantasy world.) It would be pretty handy to use parts of this data if you were creating your own virtual world for a text adventure game, but the format of CircleMUD's data files is kind of obtuse and not amenable to manipulation.
So I wrote a few scripts to convert these files into a single XML file which is 4MB when unzipped. You can parse this file and modify it to suit your needs. It contains 1979 rooms across 30 different areas (called zones in the file), with 46 shops and 569 different "mobs" (mobile objects, which are the monsters and NPCs). There are 678 different types of objects, including 116 weapons and 154 types of armor.
Math and programming have a somewhat misunderstood relationship. Many people think that you have to be good at math or made good grades in math class before you can even begin to learn programming. But how much math does a person need to know in order to program?
They don’t want to learn how to program just for the sake of programming. They don’t want to learn about algorithm complexity or implicit casting. They want to make Super Mario or Twitter or Angry Birds.
I've completed my next book, which focuses on the Pygame library and making graphical games in Python.
IDLE is great, but over time I’ve noticed a lot of problems with IDLE that I wish someone would fix.
My awesome exciting indie Pygame games: "Look At This Rock" and "Look At This Rock 2: A Different Rock"
Here are a couple games I wrote. The first was so popular that I made a sequel.
Yuanle Qiu has started translating the "Invent Your Own Computer Games with Python" into Chinese.
If you already know a bit of programming and Python, and want to get up to speed on the Pygame 2D game framework, here's a cheat sheet that you can look over. It implements a very short Pygame program covering most of Pygame's basic features.
I wrote some programs to go through 6 GB of OpenStreetMap data from http://metro.teczno.com so that I could extract a list of street names for an upcoming game project. The game will use procedural generation to create cities, so I need to have a dataset of street names but couldn't easily find one. So I've created this one and wanted to share it.