An Internship to Die For

The final game's start page.

The final game’s start page.

My hangman game was styled after one of my favorite TV shows, Breaking Bad. It is titled “Methamphetamine Production 101“. The idea of the game is that you are a new lab tech working for Walt and Jesse. Each letter guessed adds a certain chemical into the batch of meth. Add all the right chemicals, and Walt will give you a cut of the profits and demand you return everyday. Ruin the batches by putting in too many of the wrong chemicals and… well, you’ll see.

I tried to base all of the graphic design on that of the original TV show. I used many of the same colors as Walt’s infamous button down shirts. Muted greens and dark colors were prevalent in the show, and I tried to replicate that here. I wanted to give the user a way to be told what to do and give them feedback about each choice they made. To accomplish this I created a text output box in a cell phone that Jesse uses to communicate with the player. Since anonymous burner phones were always used the show, I figured I should be safe and use them here too, just to avoid any wiretaps. I designed the letter boxes after the periodic table. The main title card of the show uses green periodic table boxes to display the title. I wanted to allude to that art style, so I made the boxes to display the letter guesses in the same style. The layout I kept pretty simple. A keyboard of letter choices in the bottom left, with the boxes for letter guesses lining the top of the page. No since changing up the tried and true formula of hangman games that much. The typefaces I used were all san serif fonts. Mostly “impact”. This fit with the harsh, laboratory¬†style of the game.

An early rendition of the stage set-up.

An early rendition of the stage set-up.

To depict a users’ failure, I again referenced the TV show. In Breaking Bad, Jesse is forced to shoot and kill a previous lab assistant that was being groomed to replace Walt. In the game, Jesse does the same to the player if he or she ruins too many batches of the meth. Each time the player adds an incorrect chemical to a batch, one of the bags of Walt’s infamous Blue Sky meth is thrown out. Once five batches are destroyed, Jesse appears with a gun to the player’s face and takes them out, giving them one last message from Heisenberg himself.

image-1

The movie clip symbol depicting the user’s failure.

There were many frustrations I had while coding this project. All of the visual elements (i.e.: the graphic design, creating letter boxes, designing the winning and losing pages) were very straightforward. I think all the experience in flash we got from the animation assignment helped with that. The tough part came when I had to start coding the game mechanics themselves. The basic code such as event listeners, movie clip visibility, and moving objects around the X and Y axis was fine. The frustrations started when Flash told me that certain functions were not defined even though I clearly had them spelled out. This took me a while to troubleshoot, but finally I remembered that Flash reads everything straight down from the top. I fixed the “undefined” functions and variables by simply moving the code up the page near the top.

Another issue I had with the game was getting my counters to work correctly. To display the “winning” movie clip, I had a counter going that would keep track of how many letters the user guessed correctly. It was supposed to display the winning page when the “rightCounter” was equal to the length of the selected word. However, many times during play testing the counter would not record correctly. This meant that sometimes the player could guess all the letters correctly and have no winning page pop up, but sometimes the player could guess only 3 letters in a four letter word and the winning page would pop up. It was very infuriating. I finally managed to solve this after I realized was an issue with counters. I had Flash count the number of correct letter guesses, and when the number of guesses equaled the length of the randomly selected word, the winning screen would be displayed. The problem was I had forgotten to reset the counter whenever a new game was started, so sometimes the winning screen would be displayed and sometimes not. The only other problems I encountered were fairly easily solved (i.e.: misspellings of certain variables or functions, lots of loop tweaking, and making sure that the why/if coding was phrased right and in the correct function.) Overall, this project was challenging but the payoff was worth it. I can now say that I have designed, built, and coded my own game from scratch. Not everyone can say that.

The problematic code before the reset counter was added.

The problematic code before the rightGuess reset counter was added.

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s