A Google Chrome update breaks the audio in numerous web-based games
Unfortunately, in adventures exported (via HTML5 export) with 0.5.6 or earlier engine, any Adventuron adventures using a BEEP command will hang on Chrome (66 or greater).
This happens because Google appears to have broke web standards in it's implementation of blocking audio on autoplay media.
Google's heart was in the right place, but it just broke thousands if not hundreds of thousands of web based games, many of which were and are absolutely standards compliant.
Adventuron sequences game events using callbacks, so a sequence of commands is structured as a chain. You can think of this as a game of pass-the-parcel, with each task that Adventuron executes, being aware of the person they will pass control to next.
Tasks such as "set the value of a variable", "create a game object - such as a lamp or a shovel", "make a beep sound", "clear the screen", "display an image", etc.
With Chrome 66, the audio playback policy changes created an issue when playing a beep instigated a non-handled error that meant the next command in the callback sequence was not being executed, therefore the person at the end of the chain that is responsible for re-displaying the prompt, never performs their task.
This lead to a hang of any games that used a BEEP command (on the Chrome 66 or above browser).
The fix for 0.5.7 was threefold:
- To call AudioContext.resume() prior to any any beep. This is near-zero cost (in the grand scheme of things).
- Strengthen exception handling in the audio playback - this should hopefully mitigate bugs that might occur on games that start with beeps before user interaction.
Future fixes (not in this release):
- Detect when games start with beeps before user interaction, and force a "Click to start game button" to appear first.