Why is there an audio lag in my HTML5 games? Why?????

CosmicDrifter55CosmicDrifter55 Posts: 2Member

As of now, I am working on 2 games with Godot 3.3... and there is an audio lag for both games when I compile it to HTML5. I have researched this issue on the internet and came across numerous posts where people have complained about this. I have yet to see a fix or a workaround or any effort from the developers to deal with it. As much as I love the Godot game engine and working in it's environment, there are quite a few things that can get frustrating during the process. This is definitely one of them. Obviously this is still an ongoing issue, so can someone enlighten me as to how they deal with the lag. There is also a an audio quality issue going on as well.

If you're interested in seeing exactly what I'm dealing with here, then check out one of my games below:
https://cosmicdrifter55.itch.io/prisoners-in-space

Thank you for your time. :)

John

Comments

  • CalinouCalinou Posts: 808Admin Godot Developer
    edited May 29

    You need to export with threads enabled in the HTML5 export preset to decrease audio latency. However, this does not work when uploading to itch.io because itch.io does not use the required HTTP headers for WebAssembly threads to work. (These headers are required by web browsers for security reasons.)

    I have yet to see a fix or a workaround or any effort from the developers to deal with it.

    Support for WebAssembly threads was added in Godot 3.3. We currently have a full-time developer working on improving the HTML5 export: https://godotengine.org/article/godot-web-progress-report-6

  • CosmicDrifter55CosmicDrifter55 Posts: 2Member

    @Calinou said:
    You need to export with threads enabled in the HTML5 export preset to decrease audio latency. However, this does not work when uploading to itch.io because itch.io does not use the required HTTP headers for WebAssembly threads to work. (These headers are required by web browsers for security reasons.)

    I have yet to see a fix or a workaround or any effort from the developers to deal with it.

    Support for WebAssembly threads was added in Godot 3.3. We currently have a full-time developer working on improving the HTML5 export: https://godotengine.org/article/godot-web-progress-report-6

    Well I thought I was using the current version of Godot, but I was wrong. I was using 3.2. My bad. I got your latest version and compiled it with threads enabled. IT WORKED! There's no more lag. You warned me that it would not work on itch.io, but I uploaded my game and it seems that the lag went away and the audio sounds really good.

    Good job to that developer! Keep up the good work!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file