Hangman game in Flash

For those who don’t know me yet; I have a real passion for playing games. Ever since i’ve started to learn Flash & Actionscript, what I enjoyed most was making little games. Times haven’t changed, and those old feelings have been coming back to me. I thought it was time for me make a little simple game once more, and share the process with everybody.

The game I chose is called ‘Hangman’. I’m sure you’re all familiar with this classic pen ‘n paper game. It’s a word game that is normally played with 2 players. One person who thinks of a word, and the other player has to guess it. The first player draws the amount of letters in the word as dots or dashes on the paper so the other person knows how long it is. Then he or she starts guessing letters. Each time the player guesses right, the letter is written in the blank space. Each time he or she guesses wrong, a part of the hangman is drawn, starting with the gallow, then the noose and finally the little dead fellow. When the drawing is completed, the person guessing the word loses, and when the word is completed before the drawing is finished, the guesser wins ofcourse. That is basicly how the game works.

Since i’m making a digital version, I have chosen to make it a singleplayer game,swimming pool where the person who makes up the words is replaced by a computer player. As far as the programming logic goes, the computer will have to choose a random word (Maybe i’ll implement categories of words the player can choose from, making it a little easier to guess the word. dunno yet) and display the length of the word in dashes. When the player presses a letter on his or her keyboard, the AI will have to check if the letter is found in that specific word. If so, display all the instances of that letter in the word, if not draw a part of the hangman. Finally it will have to check if the word or drawing has been completed and act accordingly.

All I have for now is a preview of what the game will look like. I fired up Photoshop and this is what came out:

I don’t know if this is what the game will finally look like, but it’s a first design of something I had drawn on paper first. The smileys on the left represents the score, happy smileys are wins and the sad ones are the losses. When I was sketching this on paper I decided I wanted to use this counting system where lines are drawn for each win or loss, and the fifth one being a strike-through on the other bunch. So basicly these are blocks of 5 wins or losses. Imagine a player really beging hooked on this game; What happens when he or she has played over more that say 100 games. How do we represent that score? Notice that there is a number before the top row of the wins: “2x”. In the image on the left, the score of the player would be 2 times 5 + 2 = 12 wins and 3 losses. The word that had to be guessed was ‘Hangman’. On the right side of the screen, all the letters in the English alphabet are displayed. When the player chooses a letter, that letter is disabled and gets a strike-through. That way it’s easier to remember which letters the player has already chosen to guess the word.swimming pool

That’s it for now. I’ll be posting more articles about the process of making this game. I’ll be showing you how I integrate the design in Flash, how I program the logic and AI in Actionscript 3, and how I’ll be publishing this game in AIR. Stay tuned!

This entry was posted on Sunday, October 5th, 2008 at 5:35 pm and is filed under Actionscript 3.0, Flash, Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response to “Hangman game in Flash”

  1. Hangman: Importing a design in Flash CS3 | Menhir-effect blog Says:

    [...] started making a design for a Hangman game in “Hangman Game” post. Today we’re going to port that design to a Flash environment. No programming yet, though I [...]