{"id":24695964,"url":"https://github.com/gz30eee/hangman-game","last_synced_at":"2026-02-07T11:02:20.751Z","repository":{"id":270098417,"uuid":"909331825","full_name":"GZ30eee/Hangman-Game","owner":"GZ30eee","description":"A fun and interactive Hangman game where users guess words from various categories like Football Teams, Hollywood, and Animals. Enjoy the game with a virtual keyboard, dynamic canvas drawing, and responsive design","archived":false,"fork":false,"pushed_at":"2024-12-28T11:47:17.000Z","size":4504,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T21:13:35.024Z","etag":null,"topics":["background-music","canvas-drawing","categories","game-instructions","responsive-design","score-tracking","virtual-keyboard"],"latest_commit_sha":null,"homepage":"https://gz30eee.github.io/Hangman-Game/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GZ30eee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-28T11:38:47.000Z","updated_at":"2025-01-20T16:31:15.000Z","dependencies_parsed_at":"2024-12-28T12:36:30.505Z","dependency_job_id":null,"html_url":"https://github.com/GZ30eee/Hangman-Game","commit_stats":null,"previous_names":["gz30eee/hangman-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GZ30eee/Hangman-Game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZ30eee%2FHangman-Game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZ30eee%2FHangman-Game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZ30eee%2FHangman-Game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZ30eee%2FHangman-Game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GZ30eee","download_url":"https://codeload.github.com/GZ30eee/Hangman-Game/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GZ30eee%2FHangman-Game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29193089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["background-music","canvas-drawing","categories","game-instructions","responsive-design","score-tracking","virtual-keyboard"],"created_at":"2025-01-27T01:07:49.325Z","updated_at":"2026-02-07T11:02:20.731Z","avatar_url":"https://github.com/GZ30eee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://github.com/user-attachments/assets/d7a097ef-4319-4ebd-9dc6-249eccc18959)\n\n# Hangman Game\n\nA simple, yet fun, Hangman game built using HTML, CSS, and JavaScript. The game allows users to guess words from various categories such as Football Teams, Hollywood, Cities, Animals, and more. The game includes features like a virtual keyboard, a dynamic category display, and a canvas to visually display the hangman.\n(NOTE- FOR BETTER EXP. OPEN IN FULL SCREEN MODE!!)\n\n## Features\n\n- **Categories**: Choose from a variety of categories including:\n  - Football Teams\n  - Hollywood\n  - Cities\n  - Animals\n  - Aquatic\n  - Television Series\n  - Bollywood\n  - Companies\n  - Landmarks\n  - Food Items\n  - Cricket\n  - Flowers\n  - Colors\n  - Rivers\n  - Fruits\n  \n- **Canvas Drawing**: A dynamic canvas to draw the hangman as you make incorrect guesses. The game will update the drawing to show the hangman’s progress with each wrong guess.\n\n- **Virtual Keyboard**: A clickable virtual keyboard for input, making it easier to play on touchscreen devices.\n\n- **Score Tracking**: The game tracks and displays the current score and high score.\n\n- **Category Display**: The current category is shown at the top for each round. Categories include various themes such as football teams, movies, cities, and animals.\n\n- **Sound Effects**: Background music and sound effects for actions such as hint and reset, adding to the immersive experience.\n\n- **Responsive Design**: The game is fully responsive and works on devices ranging from mobile phones to desktop screens.\n\n## Requirements\n\n- Web browser that supports HTML5, CSS3, and JavaScript.\n- No additional software required; the game works directly in the browser.\n\n## Game Features\n\n### 1. **Category Selection**:\nThe game selects a category from a list of predefined categories. Based on the chosen category, the `catagoryName` (category name) is displayed at the top.\n\nExample code snippet for category selection:\n\n```javascript\nvar selectCat = function() {\n  if(chosenCategory === categories[0]){\n    catagoryName.innerHTML = \"\u003cspan style='font-family:monospace;'\u003eFOOTBALL TEAMS\u003c/span\u003e\";\n  }\n  else if(chosenCategory === categories[1]){\n    catagoryName.innerHTML = \"\u003cspan style='font-family:monospace;'\u003eHOLLYWOOD\u003c/span\u003e\";\n  }\n  else if(chosenCategory === categories[2]){\n    catagoryName.innerHTML = \"\u003cspan style='font-family:monospace;'\u003eCITIES\u003c/span\u003e\";\n  }\n  // More categories can be added in the same way...\n}\n```\n\n### 2. **Canvas for Hangman Drawing**:\nThe game uses an HTML5 canvas to visually represent the hangman’s progress. The stickman is drawn as incorrect guesses are made.\n\n```javascript\nvar canvas = document.getElementById('stickman');\nvar ctx = canvas.getContext('2d');\n```\n\n### 3. **Virtual Keyboard**:\nThe virtual keyboard allows users to click on the letters to make their guesses. The keyboard is updated as letters are selected, making it easier for users to play on touch devices.\n\n### 4. **Responsive Design**:\nThe game is designed to work on various screen sizes. It adjusts automatically to smaller screens such as tablets and mobile devices.\n\n### 5. **Gradient Background**:\nThe game features a beautiful gradient background for a visually appealing experience.\n\n```css\nbody {\n  background: linear-gradient(to right, #ff7e5f, #feb47b);\n}\n```\n\n### 6. **Sound Effects**:\nThe game plays background music and sound effects. For example, background music starts when the game is loaded, and hints or reset actions trigger their respective sounds.\n\n## How to Play\n\n1. Start the game by selecting a category.\n2. You will be presented with an incomplete word, and you must guess the missing letters.\n3. Use the virtual keyboard to make your guesses.\n4. For every wrong guess, a part of the hangman is drawn on the canvas.\n5. The game ends when the word is completed or the hangman is fully drawn.\n\n## Supported Screen Sizes\n\n- **Tablet**: Adapted for medium-sized devices.\n- **Desktop**: Supports large screen sizes with a neat layout.\n\n## Controls\n\n- **Virtual Keyboard**: Click the letters on the virtual keyboard to make a guess.\n- **Reset Button**: Click the Reset button to restart the game.\n- **Hint Button**: Get a hint for the current word.\n- **Quit Button**: Exit the game with a confirmation modal.\n\n## Setup\n\nTo run the game locally:\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   ```\n\n2. Open `index.html` in your browser.\n\n## Gallery\n![image](https://github.com/user-attachments/assets/8c593684-b095-4b08-add8-f5ef88e81f56)\n![image](https://github.com/user-attachments/assets/36d4c8b0-65bc-42e6-9c84-fb5754e26165)\n![image](https://github.com/user-attachments/assets/143eb130-8cb7-4820-85b9-fdfb344d1310)\n![image](https://github.com/user-attachments/assets/6dd2e9b7-747b-4c3f-ad45-a7b338e50d79)\n\n## Code Snippets\n\nHere is the relevant code for category selection from the JS file:\n\n```javascript\nvar selectCat = function() {\n  if(chosenCategory === categories[0]){\n    catagoryName.innerHTML = \"\u003cspan style='font-family:monospace;'\u003eFOOTBALL TEAMS\u003c/span\u003e\";\n  }\n  else if(chosenCategory === categories[1]){\n    catagoryName.innerHTML = \"\u003cspan style='font-family:monospace;'\u003eHOLLYWOOD\u003c/span\u003e\";\n  }\n  else if(chosenCategory === categories[2]){\n    catagoryName.innerHTML = \"\u003cspan style='font-family:monospace;'\u003eCITIES\u003c/span\u003e\";\n  }\n  // Add more categories...\n}\n```\n\n### Canvas Drawing for Hangman\n\nThe canvas function helps to draw the hangman dynamically as the player makes incorrect guesses:\n\n```javascript\nvar canvas = document.getElementById('stickman');\nvar ctx = canvas.getContext('2d');\n\nvar drawHangman = function(step) {\n  switch (step) {\n    case 1: // head\n      ctx.beginPath();\n      ctx.arc(50, 50, 10, 0, Math.PI * 2, true); // Draw head\n      ctx.stroke();\n      break;\n    // Draw more parts of the hangman (body, arms, etc.)\n  }\n}\n```\n\n### Virtual Keyboard\n\nThe virtual keyboard is implemented to make it easier for players to input guesses by clicking the onscreen letters.\n\n```javascript\nvar keyboard = document.getElementById('keyboard');\nkeyboard.addEventListener('click', function(event) {\n  var letter = event.target.innerText;\n  // Handle letter guessing\n});\n```\n\n## Conclusion\n\nThis Hangman game is a fun way to test your word-guessing skills. With a variety of categories, a dynamic game experience, and visually appealing design, it provides a great user experience. Enjoy playing, and challenge your friends to beat your high score!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgz30eee%2Fhangman-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgz30eee%2Fhangman-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgz30eee%2Fhangman-game/lists"}