You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
馃殌 Feature: Background music and menu sound effects聽#25
I know adding sound effect is tricky since the app starts right away, and browser requires user interaction before playing audio.
Not sure "WASD" keypress consider interaction or not 馃
Thanks for suggesting this @zernonia - agreed, audio would be great! WASD keypresses should count, yes - so maybe the background music can fade in when the user first moves?
One more caveat to consider is that the game has a tight (arbitrary, chosen by me on a whim) performance budget of 256 kB total size on the page uncompressed. I suppose we could go over for audio that's lazy-loaded... but whatever audio happens should be very compressed.
Activity
[-]Suggestion: Add bgm and/or sound effects[/-][+]馃殌 Feature: Background music and menu sound effects[/+]JoshuaKGoldberg commentedon Aug 26, 2022
Thanks for suggesting this @zernonia - agreed, audio would be great! WASD keypresses should count, yes - so maybe the background music can fade in when the user first moves?
One more caveat to consider is that the game has a tight (arbitrary, chosen by me on a whim) performance budget of 256 kB total size on the page uncompressed. I suppose we could go over for audio that's lazy-loaded... but whatever audio happens should be very compressed.
EightBittr does have a package already for playing audio: AudioPlayr. https://github.com/FullScreenShenanigans/EightBittr/tree/main/packages/audioplayr