Web build error message

This likely isn’t related to Flax Engine, but in the web build of the Flax Web Racing game,

an error shows up:

html-classic.itch.zone
JSPI is not supported in this browser.

Could anyone give me a clue as to what is happening? Web search didn’t show any relevant result.

Found the “culprit”.
javascript.options.wasm_js_promise_integration flag had to be set to true in Firefox in about:config

Right, we use the latest JSPI feature, which is not yet in all browsers or requires a newer version of the browser. All info documented here: Web | Flax Documentation

Game projects that want to target a wider range of hardware/browsers can use different build options of the engine: Web | Flax Documentation (which results in a bigger game size).

Thanks for the suggestion! :+1:

We still have a few ideas from “Flash game days” that are perfectly suited to be web browser games. Being able to publish those as such and reach a wider audience without having to deal with the “game is unplayable” type errors would be definitely better. Then over time we can switch to JSPI. As well, having downloadable executables for those who prefer is always a good option

Is there an ETA on C# support for Web build?
Based on a few things, we’ll look into C++ and see how that goes. That could be useful in terms of performance for other games down the lines. But in case there are roadblocks that might delay our work or something that we can’t figure out (in a reasonable time), we will develop the C# version as a backup option. :grinning:

Oddly, there is another Web build obstacle right now:
How do you download Web (target platform) files? Shouldn’t the option be in the Launcher? Or did we miss or not do something?

Using Flax Engine 1.12


The missing Web package has been fixed. Thanks for spotting this one!

We’ve started working on C# support few weeks ago and we’ve got AOT compilation working. Now, we’re implementing C# runtime initialization. I would expect C# in Web for 1.13 or 1.14.

1 Like

Thank you for the very quick fix! :+1:

Sounds like C++ will be the way to go for now if we want to get web builds started soon. :grinning:

Looks like another issue came up when trying to build for Web: :thinking:

[ 00:00:49.737 ]: [Info] Command: C:/Program Files/Emscripten/SDK/python/3.13.3_64bit/python.exe C:/Program Files/Emscripten/SDK/upstream/emscripten/tools/file_packager.py files.data --preload “C:\Projects/MyProject/Cache/Cooker/Web/Files@/” --lz4 --js-output=files.js
[ 00:00:49.737 ]: [Info] Working directory: C:\Projects/MyProject/Output/Web
[ 00:00:49.754 ]: [Error] C:/Program Files/Emscripten/SDK/python/3.13.3_64bit/python.exe: can’t open file ‘C:\Program’: [Errno 2] No such file or directory
[ 00:00:49.757 ]: [Error] Failed to package project files (result code: 2). See log for more info.
[ 00:00:49.757 ]: [Error] Game building failed!

Does this mean that Python doesn’t like path with space? ie: should I install Python elsewhere with no spaces?

Looks like moving Emscripten SDK folder to a path without space resolved that issue. :+1:

Ah minor path issue. Will fix that one.

Good to know! :+1:

In the mean time, we did move Emscripten to a different folder and SURPRISINGLY the Web build opened!

Well, at least the visuals showed up correctly! :grinning:
But as you mentioned, the C# side is not there yet. Firefox console logger will be useful in the future for checking out issues, eg: issue with the Flax Engine template ExitOnEsc C# script:

[ 00:00:00.159 ]: [Warning] Failed to deserialize scene object from data: {
“ID”: “6ff0581d474c84230b3d0fa9f17e0972”,
“TypeName”: “ExitOnEsc”,
“ParentID”: “74a68a984824b4510d12589f199ad68f”,
“V”: {}
}

Looking forward to that! In the mean time, we’re on to C++ make things actually move in the Web build. :rocket:

Oh, two quick questions:

  1. Much like the missing Web (target platform), will the path issue be updated quickly?
  2. Since probably you are one of the people who definitely knows the answer, was the image on the Sky documentation page created with Flax Engine? If yes, do you know how? Looks like a directional light with fog effect with a surface below and nothing above. Finally, there is a beam/ray going toward the bottom. Is that Post-FX or part of how a Camera lens distortion effect? :thinking:

Would be really cool to use something like that! :sunglasses: