Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement sound action #67

Merged

Conversation

RomThpt
Copy link
Contributor

@RomThpt RomThpt commented Jan 23, 2025

Overview

This PR introduces sound effects for core BabyBeasts actions, enhancing player immersion through synchronized audio feedback. Key updates include:


Changes

  1. Action-Sound Mapping

    • 🍎 Feed: bbeating.mp3
    • 🚿 Clean: bbshower.mp3
    • 😴 Sleep: bbsleeps.mp3
    • 🕹️ Play: bbjump.mp3
    • Revive: bbrevive.mp3
    • ⚠️ Flagged Missing Sounds:
      • awake (no file provided)
      • spawn/hatching (no file provided)
  2. Sound Implementation

    • Added useSound hooks in Tamagotchi/index.tsx for seamless audio playback.
    • Integrated sound triggers into action handlers (e.g., playFeed() on feed action).
    • Synchronized sounds with animation start times.
  3. Performance

    • Preloaded all sounds to minimize latency.
    • Set optimized volume levels (0.7) aligned with game standards.
  4. Testing

    • Verified sound-animation sync for all actions.
    • Tested cross-browser (Chrome, Firefox) and mobile/desktop playback.

Notes for Reviewers

  • Missing Sounds: awake and spawn actions lack audio files—flagged for follow-up.
  • Future Optimization: Consider OGG compression for smaller file sizes.

Acceptance Criteria Met

  • ✅ Each action plays its assigned sound.
  • 🔊 Audio aligns with animations.
  • ⚡ No noticeable latency during gameplay.

Resolves #16

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baby-beastsv2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 10:20am

case 'Play': playPlay(); break;
case 'Revive': playRevive(); break;
case 'Wake up':
console.warn('Missing sound for awake action');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we get a sound for this please? and set it, thanks @juandiegocv27 @jimenezz22

@RolandoDrRobot RolandoDrRobot merged commit cf77480 into ByteBuildersLabs:master Jan 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintainer: Juan ODBoost This issue will be available ONLY during the ODBoost
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement sound action for the Beast
3 participants