pawap90 / space-commit

The game where contributors become literal heroes! 🏆 Winner of the GitHub Actions Hackathon 2021
https://pawap90.github.io/space-commit/
MIT License
38 stars 9 forks source link

Add background music #43

Open pawap90 opened 2 years ago

pawap90 commented 2 years ago

The game could use some background music.

Please make your suggestions in the comments!

M-S-10 commented 2 years ago

Hey there, Can I take this up?

pawap90 commented 2 years ago

Sure, it's yours 🎉 Thanks!

M-S-10 commented 2 years ago

Thanks, can you guide me a little as to where do I add music?

pawap90 commented 2 years ago

I was thinking something relatively simple, like this: https://examples.ourcade.co/phaser3-typescript/audio/html5-audio/play-audio-file

Maybe load the audio in the PreloaderScene and then play it from the GameScene once it's created.

It would be nice to also have a button on the top-right corner to turn off/on the audio.

This is also an interesting alternative, but a little bit more complex: Playing the audio from a child scene: https://examples.ourcade.co/phaser3-typescript/audio/html5-audio/play-audio-from-child-scene/

If we took the 2nd approach, we could trigger different sound effects using events (that's how I handled the communication between the GameScene and the GameUIScene.

@justinhhorner was going to take the other issue related to audio. I'd love to hear your opinion on this Justin!

Also, I haven't thought of any particular soundtrack, did you have one in mind @M-S-10 ?

ghost commented 2 years ago

@pawap90 Thanks for sharing those examples! It sounds like we might want to use both approaches; use the first for background music, since that will run throughout the game, and the second approach for SFX based on events. What do you think?

+1 for adding a mute toggle at the top-right corner!

As far as style of audio, I'm planning on using ChipTone to create retro-themed SFX. If it ends up not mixing well with the background music, I can easily change the SFX for a better mix later.

pawap90 commented 2 years ago

@justinhhorner Thanks for your insights, I agree with using both approaches. Loved the idea of using ChipTone too.

@M-S-10 Let me know your thoughts and if there's anything else!

M-S-10 commented 2 years ago

Sounds good to me! 😀

On Mon 7 Feb, 2022, 18:57 Paula Santamaría, @.***> wrote:

@justinhhorner https://github.com/justinhhorner Thanks for your insights, I agree with using both approaches. Loved the idea of using ChipTone too.

@M-S-10 https://github.com/M-S-10 Let me know your thoughts and if there's anything else!

— Reply to this email directly, view it on GitHub https://github.com/pawap90/space-commit/issues/43#issuecomment-1031469307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQU5CBDLGSBAOQCUURU76P3UZ7CFJANCNFSM5KK6GACA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>