Here is the link to the live website: Word Guess: Animal Onomatopoeia
-
Choose a theme for your game! In the demo, we picked an 80s theme: 80s questions, 80s sound and an 80s aesthetic. You can choose any subject for your theme, though, so be creative!
-
Use key events to listen for the letters that your players will type.
-
Display the following on the page:
-
Press any key to get started!
-
Wins: (# of times user guessed the word correctly).
-
If the word is
madonna
, display it like this when the game starts:_ _ _ _ _ _ _
. -
As the user guesses the correct letters, reveal them:
m a d o _ _ a
.
-
-
Number of Guesses Remaining: (# of guesses remaining for the user).
-
Letters Already Guessed: (Letters the user has guessed, displayed like
L Z Y H
). -
After the user wins/loses the game should automatically choose another word and make the user play it.
- Play a sound or song when the user guesses their word correctly, like in our demo.
- Write some stylish CSS rules to make a design that fits your game's theme.
- HARD MODE: Organize your game code as an object, except for the key events to get the letter guessed. This will be a challenge if you haven't coded with JavaScript before, but we encourage anyone already familiar with the language to try this out.
- Save your whole game and its properties in an object.
- Save any of your game's functions as methods, and call them underneath your object declaration using event listeners.
- Don't forget to place your global variables and functions above your object.
- Remember: global variables, then objects, then calls.
- Definitely talk with a TA or your instructor if you get tripped up during this challenge.
-
Bee - Photo by Roberto Lopez on Unsplash
-
Bird - Photo by David Clode on Unsplash
-
Cat - Photo by Max Baskakov on Unsplash
-
Cockerel - Photo by David Cain on Unsplash
-
Dog - Photo by Joséphine Menge on Unsplash
-
Duck - Photo by Tom Gainor on Unsplash
-
Frog - Photo by Michael Romanov on Unsplash
-
Horse - Photo by George Hiles on Unsplash
-
Mouse - Photo by Zdeněk Macháček on Unsplash
-
Pig - Photo by Christopher Carson on Unsplash
-
Background - Image by Gordon Johnson from Pixabay