Creating a python based adventure game

Sep 08, 2016

----

The main project that we have been working on the past week has been the creation of a text adventure game. The concept is to develop a game that allows us to use many of the lessons we’ve had, as we studied python. This includes classes, objects, modules, inheritance, control statements, looping structures, dictionaries and other data types.

The assignment was initially a struggle. The reason that it was challenging was as much related to the fact that I do not play games as it was understanding the core python concepts to use in the process. After a little thought, I decided to make it about something I really do love - college football. Therefore, my game is:

Six days to Game Day.

Basic description

The concept of the game is very simple. You are a college football player that has six days to train (Sunday through Friday), in order to prepare for Saturday’s game. If you train well on any given day, you increase your strength. That strength comes in play on game day, because the more strength you have, the more downs you are given to score a touchdown.

The training each day is a choice of three focus areas: physical training, nutrition or rest. The mechanics of the games are fairly simple:

Physical training: A skills based number guessing game. Nutrition: A version of rock, paper, scissors - that uses supplements as the three options. Rest: A random number generated when you was yourself up, that determines how well you rested.

Challenges of development

  • Having good concept of the scope of the game in the planning process. I ended up paring back some of the ideas a lot, just to make sure that completing the project was possible.

  • User displays and interface. It was very easy to get caught in user experience issues, prior to having a functioning game. Fixing these issues can take a lot of time if I allowed them. In fact, I spent hours working on getting the menu displays functioning properly.

  • Understanding of classes. As I mentioned in my previous blog post, I am finally understanding classes in a much clearer way (Nick from AwesomeInc did mention I still have some things in that post to clean up). However, when I started working on the game, I was struggling a little. It’s nice to see that in a week’s time I have come this far.

Refactoring and Improvements

There are a bunch of changes that I would like to make. I will probably get some of those improvements down as issues on the GitHub repo, so I can address them at some point. I think the first step I will make is a complete refactoring of the code, now that I understand what is going on a little better. It might be fun to refactor the game several times over the next few months, just to see how my understanding changes over that time.

If you want to check out the project on GitHub, you can find it here: “Six days to Game Day”