Skip to content

Conversation

@yashraj4
Copy link

@yashraj4 yashraj4 commented Nov 6, 2025

🎯 What issue does this address?

Currently, players are not aware of the available keyboard shortcuts in the game. There's no way to discover controls like Space or R without guessing or reading the source code. This PR solves that by adding an in-game help panel that lists all the controls.

✨ What does this change?

This pull request implements a new keyboard shortcuts help overlay and adds new hotkeys for a better user experience:

  • Keyboard Shortcuts Overlay: A new modal (#shortcuts-help) is added to index.html. It's styled in css/style.css to match the "Game Over" results panel for a consistent UI.
  • Toggle with H key: Pressing H now toggles this new help panel on and off (Js/script.js).
  • Toggle Mute with M key: A new key listener for M is added to Js/script.js, which calls the toggleMute() function, allowing players to mute/unmute audio with their keyboard.
  • Escape Key Functionality: The Escape key can now be used to close the shortcuts panel (or the "Game Over" panel, if that is open).

Checklist:

  • New functionality meets the goals defined in the linked issue.
  • If changing the UI or game experience, screenshots or a GIF are included below.
  • Code is formatted cleanly (ran Prettier/ESLint locally).
  • All CI/CD checks in this PR passed.

🖼️ Screenshots / Video Preview

Before Changes After Changes
image WhatsApp Image 2025-11-06 at 13 35 16_1923ae58
No help overlay available. Players cannot see keyboard shortcuts. A new help overlay is available, toggled with the 'H' key.

🔗 Related Issue(s)

Fixes #72

✅ Checklist (Required)

  • I have read the project's [CONTRIBUTING.md] guidelines.
  • My code follows the project's coding style and conventions.
  • I have performed a self-review of my own code.
  • My changes generate no new errors or warnings in the browser console.
  • I have tested my changes locally on the Vercel-simulated environment (if applicable).
  • For UI changes, I have tested on different screen sizes (responsive design check).
  • My commit message(s) are clear and descriptive.

@vercel
Copy link

vercel bot commented Nov 6, 2025

@yashraj4 is attempting to deploy a commit to the Maitri Vaghasiya's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yashraj4 yashraj4 changed the title [Feature] Add keyboard shortcuts help overlay and other changes [Feature] Add keyboard shortcuts help overlay Nov 6, 2025
@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
3d-blockstack Ready Ready Preview Comment Nov 7, 2025 7:52am

@maitri-vv
Copy link
Owner

hey @yashraj4 , i m not sure why but i get this screen on my preview link
image

dont know whats the issue but can u raise a fresh PR again if the changes works for u locally

@yashraj4
Copy link
Author

yashraj4 commented Nov 8, 2025

I am not able to see the preview url, can i change the permissions in yml config?

@maitri-vv
Copy link
Owner

@yashraj4
https://3d-blockstack-git-fork-yashra-2a71fb-maitri-vaghasiyas-projects.vercel.app/

visit this preview link and let me know if u can fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants