Ashley's Forum Posts

  • Construct downloads NW.js automatically for you when you export. Just choose the NW.js export option for your project. See this tutorial for more details.

  • My advice would be: don't increment the variable directly - call a function that increments the variable, and then the function can do other work that needs to be done at the same time as that.

  • Video Recorder supports recording only audio - just choose "None" for the video format. The Voice Recorder example does this.

  • Yes, Construct will always fall back to WebGL if WebGPU is not supported for any reason. If enabled it tries WebGPU first, then falls back to WebGL 2, then falls back to WebGL 1.

  • Support for WebGPU in Construct is a major upgrade and involves a great deal of work and some backwards compatibility risk, and also needs WebGPU support from the browser/platform which is not yet supported everywhere. Therefore we are rolling out support for WebGPU gradually in steps. This forum thread will indicate the current status of support for WebGPU in Construct as it will be evolving over time.

    Background

    For more details about what WebGPU is and what this change means, see these blog posts:

    1. A brief history of graphics on the web and WebGPU
    2. From WebGL to WebGPU in Construct
    3. Introducing Construct's new WebGPU renderer

    Addon developers

    If you are an effect developer you will need to port any existing effects to WGSL to support WebGPU. For more details about this see the Addon SDK documentation on WebGPU shaders.

    Activating WebGPU

    For WebGPU to be used in your project, it must be enabled for all four of:

    1. The chosen preview/export option
    2. The browser engine
    3. The local device's software/hardware
    4. The project settings

    These are described in more detail below.

    Export support

    WebGPU is being enabled separately for individual export options as they become supported. The list below indicates which options WebGPU currently can be enabled on. In the long term we aim to support all platforms.

    • Preview / Remote Preview: supported from r337+
    • Web / Construct Arcade: supported from r345+
    • Android: supported from r380+
    • iOS: not yet supported
    • NW.js: supported from r345+
    • Windows WebView2: supported from r345+
    • macOS WKWebView: not yet supported
    • Facebook Instant Games: not yet supported
    • Playable Ads: not yet supported

    Browser engine support

    WebGPU must also be supported by the underlying browser engine. The list below indicates the current support for WebGPU in browsers. We expect that in the long term, WebGPU support will become as ubiquitous as WebGL, as all major browser vendors are actively working on it.

    • Chrome/Edge (and other Chromium-based browsers/platforms): currently supported in v113+ for Windows, macOS and ChromeOS. Android is supported from v121+. Linux is not yet supported.
    • Safari/iOS: not yet supported
    • Firefox: not yet supported

    Hardware support

    Even with a supported export option on a supported browser/platform, you are not guaranteed to get WebGPU support. This is because it requires relatively modern hardware and software.

    There is not currently any real public documentation on what kind of system requirements there are for WebGPU. However Web3DSurvey.com's WebGPU statistics show a sample of support for a range of platforms indicating how prevalent support is for particular platforms. The main thing to note is if you fulfil all these requirements and still don't get WebGPU support, it may be because your system is not supported; in that case try a newer and more up-to-date system if possible.

    In the Chrome or Edge browsers you can also visit chrome://gpu/ to see diagnostic information about the GPU and WebGL and WebGPU support.

    Project settings

    To ensure backwards compatibility, Construct currently leaves WebGPU disabled by default, so all projects currently continue to use only WebGL even if WebGPU is otherwise supported. In order to enable WebGPU for a project, you must currently go to the Advanced section of project properties, and set Use WebGPU to Yes.

    The default setting for Use WebGPU is Auto, which currently means disabled in stable releases; however for testing purposes it currently defaults to enabled in beta releases, or if Enable experimental features is enabled in Settings with a stable release. However we intend that once support is reliable enough then Auto will change to mean enabled in all cases, therefore switching all existing projects to use WebGPU automatically with no need to configure it for each project.

    Note that if the project uses any third-party effects, these must have been updated to support WebGPU. If unsupported third-party effects are in the project, then you should see a compatibility message identifying the effects when changing the Use WebGPU setting. Contact the addon developer for support if you need an effect ported to WebGPU.

    Verifying WebGPU is in use

    The easiest way to check that WebGPU is active in your project, meeting all the above support requirements, is to add a Text object to your project and display the PlatformInfo.Renderer expression in it. This will return webgpu when the WebGPU renderer is in use, otherwise it will say webgl1 or webgl2.

    Other ways to check are also:

    • Open Construct's debugger; the second last item in the debugger subtitle includes the same renderer string as the PlatformInfo.Renderer expression, which will also be webgpu if WebGPU is in use.
    • Open the browser console (typically by pressing F12) and look for the console log message indicating Construct's renderer. This should include a line that reads something like "[C3 runtime] Hosted in worker, rendering with WebGPU" if WebGPU is in use; otherwise it will refer to WebGL.

    Editor support

    You can also enable WebGPU for the Construct editor itself, where it will be used to render the Layout View. This will also use the WGSL variants of effects in the editor. You can enable this in Settings by changing Enable WebGPU in editor to Yes. (Much like the Enable WebGPU project property, this defaults to Auto, which currently means disabled but will in future change to mean enabled.)

    You can verify WebGPU is in use in the editor by choosing Menu > About > Platform information. If the editor is using WebGPU, then the Platform Information dialog will list WebGPU information instead of WebGL information.

    Issues

    If you run in to any problems when WebGPU is active, please file an issue for them the usual way, including following all the bug report guidelines, and stating that the issue is specific to WebGPU.

    Known issues

    Here is a list of known issues with WebGPU that are currently being tracked.

    Conclusion

    WebGPU is a major technology upgrade for both the web and for Construct. We expect to see some significant benefits to supporting WebGPU, including substantially improved performance in some cases, which should be outlined further in an upcoming blog. However with major new technologies comes some risk, and so we are taking precautions and rolling out support gradually. Be sure to check back here in future as the support status will be changing over time and this thread will be updated accordingly.

    Tagged:

  • I'm not sure when C3 will support building locally without using your servers, including exporting Cordova projects.

    For the record, Construct has always supported local offline builds.

  • You need more than just the iv to be able to decrypt the data. I added the encrypted binary data format to the Cryptography plugin manual entry which should cover everything you need to interoperate with other code and services.

  • The encrypted data is actually a binary structure which includes some metadata at the start including the iv. But my point in this case, you don't need to worry about any of that, as if you just use HTTPS it's all encrypted anyway.

  • You do not have permission to view this post

  • Custom actions aren't called per-instance in the event system though - an API that matches the way the event system actually works would look more like runtime.objects.Sprite.customActions.MyAction(arrayOfPickedInstances, ...params), but that's not a very natural for a JavaScript API, which is what I meant by the different paradigms.

  • It's sent along with the encrypted data. But you shouldn't need to do that. Use a HTTPS connection and everything you send to the server is already encrypted.

  • Add a Text Input, tick the 'Spell check' property, and the browser will use its built-in spellchecker for whatever is typed in.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Construct doesn't provide a script API for the Audio object, but you can just access the Web Audio API directly when using JavaScript code. The concept of tags isn't part of the Web Audio API: it's added by Construct for organising audio in event sheets. Tags aren't really necessary when using JavaScript directly, as you already have full access to the entire Web Audio API.

  • This was already asked and answered here (please don't cross-post questions)

  • I've never seen such a long audio lag on any of the Android devices in our office. For Construct's part, it already uses the Web Audio API for playback which is designed for low latency playback, and I doubt any custom JavaScript can beat that. I suspect the problem is with the device, or the version of Android it runs, and not Construct.