space-commit icon indicating copy to clipboard operation
space-commit copied to clipboard

Add background music

Open pawap90 opened this issue 4 years ago • 7 comments

The game could use some background music.

Please make your suggestions in the comments!

pawap90 avatar Dec 18 '21 18:12 pawap90

Hey there, Can I take this up?

M-S-10 avatar Jan 30 '22 07:01 M-S-10

Sure, it's yours 🎉 Thanks!

pawap90 avatar Jan 31 '22 12:01 pawap90

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

M-S-10 avatar Feb 02 '22 08:02 M-S-10

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 ?

pawap90 avatar Feb 03 '22 13:02 pawap90

@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.

ghost avatar Feb 04 '22 13:02 ghost

@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!

pawap90 avatar Feb 07 '22 13:02 pawap90

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: @.***>

M-S-10 avatar Feb 07 '22 14:02 M-S-10