Click here to play the game: https://heiner000.github.io/project-1/
Humphrey is an apprentice to Master Wizard Timothy. Master Timothy has been commissioned by his monarch to brew a special potion, however he lacks the needed ingredients. There is an herbalist across the bridge who can grow the specific reagents for the brew, but it will take time. Master Timothy will send Hump to fetch the ingredients when they are ready, but each time Humphrey crosses the bridge he will have to pay the bridge Troll's toll.
The bridge Troll's toll must be paid, and he will only be satisfied with blood and bones! Unless you can answer his increasingly difficult series of riddles, then perhaps he'll let you by this time without a bite.
In this text-based adventure game Hump must answer the troll's riddles correctly to cross the bridge, otherwise he may take a limb. Lose more than 3 limbs and he won't make a very good wizard's apprentice anymore. Answer enough riddles correctly to bring back the required herbs or he'll lose his apprenticeship.
- HTML
- CSS
- JavaScript
- DOM Manipulation
- Display a starting screen with instruction button & start button
- Gameplay screen displays prompt area, option buttons, Hump's limb count, gold, & inventory
- Prompt area contains Troll's dialogue/riddle
- 4 buttons of options for possible riddle solutions
- Decrement Hump's limb count for each riddle missed
- Display loser screen for 3rd loss & include reset button
- Display winner screen for 3 riddles solved
- Set time limit for each answer
- Randomly populate riddle prompt with riddles pulled from 3 different arrays rated on riddle difficulty
- Include hard mode where instead of 4 buttons, there's just a form for user's input to answer riddles
- Wizard difficulty mode: form/no buttons + only pull riddles from hardest array
- Possible sprites or additional styling
- focus on 'hangman aspect'
- don't get stuck in busy work until MVP is finished
I wanted more practice using the JavaScript DOM to give more dynamic function to a webpage. I had an idea of the framework I needed to do everything, but as I started to build out the dom I started to become more and more lost and confused inside my own code. This reminded me of the important of comments, especially when I left something temporarily undone as I finished out something else.
The other difficulty that I ran into was as I was building out the actions that needed to happen with each click, they quickly turned out to be much larger code blocks than I had anticipated. So some things were turned into helper functions. Which added to the difficulty of expanding the functionality. When I started working on some stretch goals, I ran into the issue of my current code not being super adaptable and I would have to almost completely rewrite it to incorporate my stretch goals.
That being said, I think I now have a greater appreciation for breaking the problem up into smaller bits and creating as many helper functions as it takes to allow the code to be more flexible when introducing new functions.
background-image: https://www.pexels.com/photo/stone-bridge-on-river-9954665/
tooltip tutorial: https://www.youtube.com/watch?v=qdiUrCnuCjI
css stickfigure: https://codepen.io/lorayoconnell/pen/pyayOP?editors=1100
pain sound: https://youtu.be/1X1K4cL32gk
victory sound: https://youtu.be/WzxCMbWwEeQ
background music: https://youtu.be/1f-NQAgm-YM
loss sound: https://youtu.be/CkmALlC-3d0