We built an HTML5 version of our current Defold game project.
We ran the HTML5 version on Microsoft Windows 10 Pro 64Bit.
We tried Edge, Firefox, Chrome, & Opera Internet browsers.
While the HTML5 version ran on all 4 above Internet browsers we have audio issues:
When switching scenes, the music stops for about 1/2 a second?
Any ideas on how to solve above audio issue on HTML5 version on Windows 10?
Our working Frames Per Second counter shows the game running full speed (60 FPS).
Let us know, thanks!
HTML5 builds are single threaded due to Meltdown and Spectre CPU vulnerabilities. Nothing we nor Defold devs can do about it. A solution is to keep everything loaded at once. Or fade out all audio before doing a load screen when the next things load.
Instead of loading/unloading everything between screens you either load it all at the start and enable/disable as needed, or add everything to your initial collection.
I don’t recommend you spend your time doing either of these for your test project though just for HTML5 but keep it in mind if you want to make HTML5 focused games in the future with this limitation in mind.
Again, it’s something which impacts all HTML5 games including ones made in other engines like Unity.
Something easy you can try is putting a reference to all of your .sound components and add .sprite components which have a copy of all of the texture atlases you use in your main collection so that the amount of resources you load between screens is reduced.