Dragon Hunter RPG
Welcome to Dragon Hunter, a text-based role-playing game (RPG) built using HTML, CSS, and JavaScript. As the hero of the game, your mission is to save the town by defeating a fearsome dragon blocking everyone's escape. Along the way, you'll navigate through various locations, purchase items, fight monsters, and gather gold and experience.
This project showcases skills in front-end development, logic-based gameplay design, and the ability to craft an interactive user experience using JavaScript. Features
Interactive Gameplay: Navigate through locations like the town square, store, and cave.
Combat System: Fight monsters such as slimes, fanged beasts, and the ultimate dragon.
Inventory Management: Collect weapons with increasing power and manage your inventory strategically.
Progression Mechanics: Gain experience points (XP), collect gold, and upgrade your character's stats.
Randomized Events: Includes an "Easter Egg" mini-game with randomized outcomes.
Responsive Feedback: Displays dynamic stats (XP, health, gold) and game messages to keep players informed.
Technologies Used
HTML: Structures the game interface and layout.
CSS: Adds a styled theme with colors, gradients, and spacing for a polished appearance.
JavaScript: Handles the core gameplay logic, player interactions, and dynamic UI updates.
How to Play
Starting the Game: Open the index.html file in your web browser.
Explore Locations:
Town Square: Decide where to go next.
Store: Buy health, weapons, or sell items for gold.
Cave: Battle monsters to earn XP and gold.
Combat:
Choose to attack, dodge, or run during fights.
Use your weapons strategically to defeat enemies.
Win the Game: Defeat the dragon to save the town and claim victory!
Lose Condition: If your health reaches 0, the game ends, but you can restart.
Easter Egg: Find a secret mini-game in the store by exploring.
Project Highlights
Game Logic: The game integrates object-oriented programming concepts for weapons, monsters, and locations.
Dynamic UI Updates: Stats like health, gold, and XP are updated in real-time during gameplay.
Replayability: Randomized elements such as monster attacks, loot, and Easter Egg outcomes ensure a unique experience each time.
Bug-Free Design: Carefully handled edge cases like insufficient gold, weapon breaks, and losing conditions.
What I Learned
Implementing state management for a dynamic game.
Using JavaScript arrays and objects to store and manipulate game data.
Creating a user-friendly interface with meaningful feedback.
Debugging JavaScript code to handle edge cases and ensure smooth gameplay.
Installation
Clone this repository or download the ZIP file.
Extract the contents and open the index.html file in a browser.
Future Improvements
Need to add testing (functional and non-functional) Set up GitHub Actions Add more style - make it pop out more More enemy variants Animations Music?
Contact
Feel free to reach out for collaboration or feedback: Email: [email protected] GitHub: https://github.com/Mcstovies LinkedIn: www.linkedin.com/in/adam-clarke-47a785326
This project was created using the free coding courses at https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/#learn-basic-javascript-by-building-a-role-playing-game. This demonstrates my ability to design and develop interactive applications, showcasing my skills in JavaScript, game logic, and user experience. Thank you for checking it out!