Open zernonia opened 2 years ago
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
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 🤔
But this is just a "good to have" features 😁