The name of my hangman game is The Old Cat and Mouse Game: Hangman Style. I based my game on my love of cats (what a surprise), and I took a lot of inspiration from the classic cartoon Tom and Jerry. The premise of the game is that the cat is chasing all the little mice and desperately trying to catch them and eat them. The only way to give the cat what he wants is to get the word right, otherwise you end up with one angry kitty.
Staying with the theme of a traditional hangman game, when you guess the word right you win the game, and if you guess too many letters wrong you lose the game. However, differently from a traditional hangman game, the punishment mechanic in this game is very different. When you guess the word right, you are taken to a victory page that shows the cat sitting happily with a mouse tail in his mouth, helping the player to understand that the cat was able to catch all the mice and eat them.
However, if you guess too many letters wrong you make the poor cat very angry. Each time a wrong letter is guessed, one of the mice runs away, and the cat growls angrily. Once all the mice have ran away, you are unable to make any more moves and the game must be restarted, the cat going without his dinner. I chose this approach to the punishment mechanic because I thought it fit in well with the cat and mouse theme of my game, as cats are normally pictured as chasing mice around.
My design choices for this game mainly came from my animation. I wanted to stay with the cat theme, as I’m an avid cat lover, so I simply copied frames from my animation assignment and put them into my hangman game. I had to make several nested timelines for the cat and the mouse for the animation to work, but it all worked out in the end. The background is also from my animation, all that needed to be added was the letters, letter boxes, and the restart button. The color scheme for my game was a little bland to begin with, so I made the letter boxes and the restart button a nice purple pink to add some color. I used a typeface called Revolution, simply because I played around with a lot of different kinds of font and found that Revolution looked the best with the design of my game. The layout of my game also seemed pretty obvious, as it seemed natural to have the letter boxes at the top, the letters to guess from in the middle, and the punishment mechanic at the bottom.
I came across a few issues when I was creating my game. Making the animation work and setting up my stage with all the buttons and letters was pretty simple, it was the code that caused a lot of problems. The first issue I came across was figuring out how to make the letters appear in the letter boxes. I had all the letters hooked up as buttons, but couldn’t figure out how to create a loop that would populate the letter boxes when the right letter was clicked on. I played around with the loops for a little while, and Kim helped a lot, especially with helping me understand the logic behind the loop, and I was finally able to figure it out. The next problem I had was some of the letters not showing up in the letter boxes when guessed correctly. Some of letters would randomly not show up in the letter boxes, even when guessed correctly, and I couldn’t figure out what the problem was. I finally understood that I needed to embed the font that I was using in order to make all the letters show up. The third problem I had was making the mice disappear when a wrong letter was guessed. First I had the code make all the mice disappear at once, and then none disappeared at all. I finally figured out that I had to put all the instances of the mice into an array, and then call the array in a loop that would go through and remove one mouse at a time when a wrong letter was guessed.