Ashley's Forum Posts

  • Does the project use the legacy Function plugin? If so then for backwards compatibility c3_callFunction() will call a function in the legacy Function plugin instead of a built-in function. To make sure it calls built-in functions, remove the legacy Function plugin.

  • If a third party plugin is broken (it looks like it's lunarray_Tween), then try deleting it from the project. Make sure every object that uses it as a behavior has the behavior removed. That should mean preview works again. Then you can probably replace it with the new built-in Tween behavior.

  • As far as I can tell from a quick glance at the docs, they don't use a real browser engine - it doesn't use HTML and CSS, instead using something they call WXML and WXSS.

    Past painful experience has taught me that trying to support non-standard browser engines is difficult to justify. It takes an enormous amount of development work and still never ends up working 100% correctly, with endless bugs that never happen in real browsers, and endless incompatibilities with how real browsers work, causing us to have to write complicated code all through the engine to deal with the various problems, which in turn risk breaking other platforms and making maintenance more difficult for the codebase as a whole. So it turns out being a huge time sink with product-wide disadvantages and then everyone still complains about it being broken anyway.

    Meanwhile if they just used a webview and used a real browser engine, we could achieve near-100% compatibility with very little work. So I'm afraid so long as they use their own custom not-a-real-browser engine, I would be extremely reluctant to work on this; if they supported real browser-based webviews, it would be much more likely we could support it. I don't know why they wouldn't use a real browser engine - it would be much less work both for them and for us, and modern browser engines have exceptional features and performance.

    Problem solved and further replies about attitude don't help anyone, so closing thread.

    This forum post will serve as preliminary documentation for the new support for WebGL 2 shader variants now supported in r321.

    To get started, download the latest effect SDK files from the Addon SDK manual. This now includes a sample WebGL 2 effect, which just renders red with WebGL 1 and green with WebGL 2 to demonstrate which variant is in use.

    Compatibility

    All existing WebGL 1 shaders are compatible with both WebGL 1 and WebGL 2. There is no need to write a WebGL 2 variant of a shader unless you need specific features only available with WebGL 2.

    If you do write a WebGL 2 shader, we strongly recommend still providing a WebGL 1 shader. Do whatever you can to support WebGL 1, whether it's a low quality version, glitchy, or even just output transparency so it doesn't render. If you don't provide a WebGL 1 shader at all, then any project using your shader will cause an error on devices that still only support WebGL 1, with the project failing to load and just displaying a blank screen. There are some details below on using WebGL 1 extensions to support more devices.

    Providing a WebGL 2 shader variant

    To provide a WebGL 2 shader variant, add the following property to addon.json:

    "supported-renderers": ["webgl", "webgl2"]

    This tells Construct to look for both a WebGL 1 and WebGL 2 shader for your addon.

    The WebGL 1 shader is still in the file effect.fx as before. If enabled then the file effect.webgl2.fx specifies the shader to load for WebGL 2.

    Writing WebGL 2 shaders

    Our documentation doesn't cover the full details of writing WebGL shaders - there are lots of other resources across the web covering that. However some key points to note when writing a WebGL 2 shader are:

    • A WebGL 2 shader MUST start with the line #version 300 es. This must be the first line - no comments or other lines are allowed before it.
    • Change varying to in for the vTex declaration.
    • gl_FragColor is not used in WebGL 2 shaders. Instead declare out lowp vec4 outColor; at the top level and assign the result color to that.
    • The texture2D() function for sampling a texture is now just texture() with WebGL 2.

    Once adapted you can then make use of WebGL 2 shader features, such as dFdx(), dFdy() and textureGrad().

    Using WebGL 1 extensions

    When only WebGL 1 is supported, Construct r321+ unconditionally activates the following extensions if supported:

    • EXT_frag_depth
    • OES_standard_derivatives
    • EXT_shader_texture_lod

    If your WebGL 2 shader uses equivalent features, this means you can sometimes support WebGL 1 too by activating them in your WebGL 1 shader, e.g.:

    #extension GL_EXT_frag_depth : enable
    #extension GL_EXT_shader_texture_lod : enable
    #extension GL_OES_standard_derivatives : enable
    
    // now you can use gl_FragDepthEXT, dFdx, dFdy, texture2DGradEXT etc.

    Note however Construct currently doesn't support any way to provide an alternative WebGL 1 shader when these extensions are not supported. Either WebGL 2 or WebGL 1 with some extensions should be widely supported, but it is difficult to find good quality data on this. This approach lets you support more devices though, as instead of requiring WebGL 2, your shader could work with WebGL 1 too if the necessary extensions are available.

    Testing

    Construct r321+ now provides a setting to force the editor and preview to run with WebGL 1. This can help you test your shader variants with both WebGL 1 and WebGL 2 (assuming your device supports WebGL 2). Note this option exists for shader testing only - exported projects will continue to use WebGL 2 when available regardless of the editor setting.

    Conclusion

    Effect addons in Construct r321+ can now take advantage of WebGL 2 shader features by providing a WebGL 2 shader variant. However the shader must be written with updated syntax for GLSL ES 3.0. It is sometimes possible to use WebGL 2 shader features with WebGL 1 using extensions, which will broaden support for your shader.

  • Due to staff vacation it may take a little longer to get back to you by email. Please be patient. I'm afraid we cannot help with payment issues on the public forum so this will be taken up by email in due course.

  • Try changing the "loader style" project property, and see Icons & Splash in the manual.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    You can turn off the reminder in settings. This thread is 5 months old and I don't think bumping it with more replies adds much, so closing.

  • I'm afraid that in general it's impossible to solve problems from already-published games, or if we are missing key details about what features are in use, which devices are affected, or which steps to follow. This is why we have the bug report guidelines. Without those details it's usually impossible to help, but with them we can investigate and try to fix the problem.

  • Construct does remember all your settings. However if you use private browsing, adjust your privacy settings so websites can't store cookies, use browser extensions that are aimed at improving privacy, or otherwise do anything that clears storage, then it will keep clearing the settings that Construct has saved.

  • If the "signal" action runs a "wait for signal" event, isn't that the same as just calling a function?

  • The Construct 2 runtime worked significantly differently - the C3 runtime was entirely rewritten from scratch. It's entirely possible it's a graphics driver problem that only affects the C3 runtime. However if you still think this is a problem with Construct itself, please file an issue following all the guidelines so we can properly investigate.

    If you can reliably reproduce an issue with Construct, please file an issue. You don't need to share your whole project, you can just fill a project with dummy content.

  • According to this page, Chrome on Android is still actively supported on Android 7+.

  • Without more details, I would guess these are graphics driver bugs on the device. That's usually the cause of display glitches. If it was Construct itself doing something wrong, then generally that would look wrong on all devices, as it runs identical code on all platforms; if something is only broken on one kind of device, that usually means a problem with that device.