Building for Web

  • #1, by matthew-woodFriday, 08. May, 05:44 A month ago
    I have built my project for mac and pc with ease, but am having trouble with building for Web. I have added all the files to my website (running locally) and added rules to allow serving .vis, .vi, .vc, ect to allow it to get the assets. But for some reason I get an error that isnt very helpful.

    Uncaught RuntimeError: function signature mismatch
        at wasm-function[9029]:0x4267de
        at wasm-function[1836]:0xb4e75
        at wasm-function[7319]:0x35c118
        at wasm-function[1131]:0x55dc0
        at wasm-function[10708]:0x4f4c47
        at wasm-function[10709]:0x4f4f4f
        at wasm-function[10591]:0x4e6068
        at wasm-function[1752]:0xaa0b1
        at wasm-function[1736]:0xa8223
        at wasm-function[1556]:0x8bff7

    Any ideas on what might be happening? Maybe a tutorial on deploying to a server?

    Newbie

    5 Posts


  • #2, by sebastianFriday, 08. May, 10:07 A month ago
    how do you run the website locally?
    It doesnt work if you just open the index file in the browser. 
    It needs to run on a (local) webserver. 
    One way to setup one on your computer is "xampp" to my knowledge. But there are other ways recently like using node.js/npm or equivilants. 

    Thread Captain

    2331 Posts

  • #3, by matthew-woodFriday, 08. May, 18:12 A month ago
    I created an empty project in Visual Studio (since i will be hosting this on my go daddy server) using ASP.NET
    I put everything in the root folder and had to add file extension rules to my web config to allow the serving of the various file types. It appears that everything is being served correctly, but there is a crash in the web assembly.
    I create websites and apps for a living so I'm comfortable with technical instructions if you have some smile

    Newbie

    5 Posts

  • #4, by SimonSFriday, 08. May, 20:43 A month ago
    Please rebuild and send me the error log again, it contains symbols now.

    Thread Captain

    1314 Posts

  • #5, by matthew-woodSaturday, 09. May, 18:03 A month ago
    Thanks for the help! That gave me enough info to figure it out smile
    So the issue was audio. In web deployments audio must be in ogg format. Mp3 will cause it not to load. From a customer standpoint, I would say just prevent me from using mp3s or give me a big ugly warning when I'm trying to build with them for web.

    Newbie

    5 Posts

  • #6, by afrlmeSaturday, 09. May, 18:35 A month ago
    That's down to certain browsers not supporting mp3 files. You will have to google which browsers support what. I think, in regards to mp3 not being supported was likely due to it not being an open source format/container until a couple or so years back.

    You should really be using ogg to begin with as it's the recommended format & it's an open source/container format, which means it doesn't need any licenses to distribute audio using that format.

    Imperator

    6775 Posts

  • #7, by matthew-woodSaturday, 09. May, 19:17 A month ago
    It's really easy to not be aware of the format limitations as a newer game dev. This post helped me figure out the issue:
    https://www.visionaire-studio.net/forum/thread/running-visio...

    Thanks again and I will definitely be modifying my workflow to use the open formats! 

    Newbie

    5 Posts

  • #8, by afrlmeSaturday, 09. May, 21:26 A month ago
    I would highly recommend using webp for images & animations too. It's a great format for optimization due to the much smaller file sizes compared to png, which means much less required storage space/loading time, which equals better overall optimization for your game, which means it should run much smoother for more people. wink


    For videos you should be using mkv (matroska) format with vp8 or vp9 video codec & ogg (vorbis) audio codec.

    Imperator

    6775 Posts

Write post