Skip to content

Add complete sound system with background music and localStorage pers…#90

Merged
FOSSCLUB-LBSITW merged 1 commit into
FOSSCLUB-LBSITW:mainfrom
megha200479:feature/sound-effects
Mar 3, 2026
Merged

Add complete sound system with background music and localStorage pers…#90
FOSSCLUB-LBSITW merged 1 commit into
FOSSCLUB-LBSITW:mainfrom
megha200479:feature/sound-effects

Conversation

@megha200479
Copy link
Copy Markdown
Contributor

📌 Description

This PR adds a complete sound system to the Memory Block Game to improve gameplay interactivity and user engagement.

The implementation includes sound effects for game actions, background music, and persistent sound settings using localStorage.


🔗 Related Issue

Closes: #87


🛠 Changes Made

  • Added card flip sound
  • Added match success sound
  • Added mismatch sound
  • Added win/completion sound
  • Added looping background music
  • Implemented mute/unmute toggle
  • Implemented volume slider
  • Persisted sound preferences (volume + mute state) using localStorage
  • Fixed image overflow issue to ensure character images remain inside cards
  • Improved card reveal logic to support both image and emoji types

Before:

  • No sound feedback
  • No background music
  • Images could overflow card boundaries

After:

  • Sound effects triggered on game actions
  • Background music plays on user interaction
  • Volume and mute state persist after page reload
  • Images remain properly constrained within card layout

✅ Checklist

  • [✅] I have tested my changes
  • [✅] My code follows project guidelines
  • [✅] I have linked the related issue

@github-actions github-actions Bot added assigned enhancement New feature or request HackTheStack as a part of hack the stack event level-2 labels Mar 3, 2026
@FOSSCLUB-LBSITW FOSSCLUB-LBSITW merged commit 696a163 into FOSSCLUB-LBSITW:main Mar 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assigned enhancement New feature or request HackTheStack as a part of hack the stack event level-2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement interactive sound effects with toggle and persistent user preference

2 participants