Merry Christmas! This has been one of the most requested features for me to add to the tutorial, so here goes. While it modifies the free tutorial code, the concepts here can also apply to the book. Saving and loading…
How to use Python generators to save memory
I recently saw a Reddit thread where someone was asking for help managing memory in Python. It was a pretty short script, but it contained the following function: Needless to say, I think I found the memory problem. This function…
NaNoGenMo 2014 Dev Diary #2: Setting up the template
NaNoGenMo is an idea created by Darius Kazemi to parody NaNoWriWo. Instead of writing a novel, developers write programs to generate 50k+ word “novels”. This series of posts will document my participation throughout the month. Having loaded sample data into…
How to Write a Text Adventure in Python
People new to programming often ask for suggestions of what projects they should work on and a common reply is, “Write a text adventure game!” I think there are even some popular tutorials floating around that assign this as homework…
How to Write a Text Adventure in Python Part 4: The Game Loop
This is an abbreviated version of the book Make Your Own Python Text Adventure. The end is near, we’re almost ready to play the game! We’ll finish this series by implementing the game loop and receiving input from the human…