CodeCademy CS101 Project

Introduction

I am in the process of taking the CS101 course on codecademy. In the course they ask you to make a game that is playable on the terminal and based on the python lessons. This was my first time doing anything of the sort! I very much enjoyed the process and am happy with the result.

The Criteria

  • Build a terminal program using Python
  • Add at least one interactive feature using input()
  • Use Git version control
  • Use the command line and file navigation
  • Write a technical blog post on the project

Back Story

I had never designed a game before and at first was quite nervous. After some joking with my wife about making a game about our cat, I came up with a game based on a favorite movie of mine. The game is called "STAB: The Scream Movie Game". It is based around the first sequence in the "Scream" movie where Casey Becker (Drew Barrymore) is harassed by the Ghost Face killer. The game pretty much is a choose your own adventure but stays pretty true to the scene minus some verbiage to make things work.

Design

This being my first ever solo coding endeavor, it took a couple of tries to come up with a game plan that worked. I spent a couple days at work making pseudo code in notes on my phone. From there I made a word document better laying out the pseudo structure. Which then became another document stating the syntax for each part of the game.

The basic structure is a Class with multiple methods. I knew I wanted to add a suspense aspect since this is based on a horror movie. For that I found a loop that would print each character one by one to the terminal. I had also seen another project use a function to clear the terminal in game play, which I incorporated as well. For both of these additions to work I needed to import the sys module and the os module. A couple other modules I used were:

  • Time.sleep() - for adding delays and helping with the suspense.
  • termcolor.colored() - to add color to the text and differentiate characters.
  • pyfiglet.Figlet() - to create ASCII art for Title and Game Over screen.
  • random.randomint() - to randomize the bonus question answer.

Game Play

The way the game is played goes as follows:

  • Title screen.
  • Choose character.
  • Start game.
  • Answer first question.
  • Possible bonus question.
  • Answer second question.
  • Possible bonus question.
  • Answer third question.

Conclusion

I really had a lot of fun working on this project. I am a huge fan of the movie so the content alone kept me excited throughout the process. The outcome is pretty much what I wanted. I've only made a couple tweaks (some while writing this post) and am quite happy with the result. Hope you guys enjoy. Below is a link to the Github. RIP Wes Craven.

17