I fixed the audio initialisation


Chrome's got this feature it's introduced since I first published Whitson earlier this year, whereby it won't permit any audio output until an audio gets played as a direct response to a user interaction. This is actually a pretty great idea -- it stops loud-ass pages from blasting audio as soon as they load -- but it means that it breaks Whitson, which tries to initialise an audio context immediately so that it can load its assets as soon as possible.

So now there's an interstitial "click to begin" screen that appears first. Loading of assets continues in the background (including audio data!), but it won't actually create the audio context itself until the user clicks the screen. 

This also solves an issue where it wasn't clear that the game wasn't receiving keyboard presses because the iframe didn't have focus. Whitson doesn't use any mouse input, so you'd need to focus the window manually. Not any more! Well, you do still need to focus manually, but it's not a secret.

That's it! Bugfix!

Files

whitson.zip 9 MB
29 days ago

Leave a comment

Log in with your itch.io account to leave a comment.