Hangman Word Guessing Game
Project Overview
The Hangman Word Guessing Game is a web-based puzzle game where players try to guess a hidden word by suggesting letters within a limited number of attempts. Each wrong guess reveals part of a “hangman” drawing, and the game ends if the drawing is completed. This project demonstrates string manipulation, backend word management, real-time validation, and interactive UI design.
Key Features
-
User Authentication (Optional)
-
Players can register/login to save game progress and track their scores.
-
Guest mode for quick play without registration.
-
-
Game Modes
-
Single-Player Mode: Guess words chosen randomly from a database.
-
Multiplayer Mode (Optional): One player sets a word while the other guesses.
-
Timed Challenge Mode: Guess as many words as possible within a time limit.
-
-
Word Database
-
Stores words in different categories (animals, fruits, movies, countries, etc.).
-
Random word selection for each new game.
-
-
Gameplay Mechanics
-
Word displayed as blanks (“_ _ _ _”).
-
Player inputs a letter →
-
If correct → revealed in the word.
-
If incorrect → part of the hangman drawing is shown.
-
-
Limited number of wrong attempts (e.g., 6–8).
-
-
Hints & Difficulty Levels
-
Easy, Medium, Hard (based on word length and hints allowed).
-
Hints reveal one random letter.
-
-
Scoring System
-
Points awarded for correct guesses.
-
Bonus for winning with fewer wrong attempts.
-
-
Leaderboard & Player Stats
-
Tracks total wins, losses, and highest scores.
-
Displays global leaderboard for top players.
-
-
Responsive UI
-
Attractive hangman illustrations with animations.
-
Mobile-friendly design using Bootstrap.
-
Technology Stack
-
Frontend: HTML, CSS, Bootstrap, JavaScript (for UI, animations, and word input validation).
-
Backend:
-
Node.js / PHP / Java for managing word database, user sessions, and multiplayer.
-
-
Database: MySQL / MongoDB (for storing words, categories, user stats, and leaderboard).
How It Works
-
Player logs in (or plays as guest).
-
Game selects a random word (or player sets a word in multiplayer).
-
Word displayed as blanks on the screen.
-
Player guesses letters:
-
Correct → revealed in the word.
-
Wrong → part of the hangman is drawn.
-
-
Game ends if:
-
Word is guessed correctly → Player wins.
-
Hangman is fully drawn → Player loses.
-
-
Score updated and stored in leaderboard.