Ashley's Recent Forum Activity

  • It's only supported if the browser supports encoding in that format.

    You can check the supported encode formats in Construct's 'About' dialog, or using the Is audio/video format supported conditions in Game Recorder.

    AFAIK, the only browser which supports h.264 encoding is Safari 14.1, which is not out yet (it should be out early next year).

  • I don't know what your code is really doing, so I can't say. But the iframe object's default properties are configured to allow YouTube embeds. So you can just match what that does.

  • I just tried it and it works fine. I dropped in an iframe object, set the URL to youtube.com/embed/pWiC5Ln_0yA and previewed the project - it showed the YouTube video correctly.

  • Exporting desktop apps is definitely still supported. If you run in to any problems though, please file an issue following all the guidelines, and we'll do our best to fix it.

  • If you run in to any problems, please file an issue following all the guidelines.

  • It's a known issue with the local font access API experiment. Turn off the experimental features setting to avoid it.

    Note if you leave the experimental features setting enabled, you will automatically have all future experiments enabled, and be subject to any crashes or problems those experiments introduce.

  • There are two warnings on export, one about the project version, and another about the missing Mobile Ad details. Both could cause problems, so I assume that is what the problem is.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think this will work. If plugin A requires version A, and plugin B requires version B, it's not possible to satisfy both requirements. A better solution is to update plugins to work with the latest version.

  • The link to the Construct 3 version of the tutorial is: Delta-time and framerate independence

  • As of r226, Construct 3 supports JavaScript Modules, which brings significant improvements to the scripting feature. It also improves the loading time of preview, as it works around a Chrome bug that causes slow loading times in the old "classic" mode.

    For technical reasons, the entire runtime and all third-party scripts all have to run in the same mode - either classic or modules mode. I would imagine most third-party addons do not need to make any change to support modules mode. However an issue came up with one third-party addon that suggests some addon developers will need to make changes. The necessary changes should be very small and quick to make, at the same level as routine bug fixes or maintenance that all responsible addon developers should already be doing. Also if addons are broken in modules mode, they are probably broken in other cases, such as after export, or when minifying, so these changes ought to have been made anyway regardless of the introduction of modules mode.

    The Addon SDK downloads have all always used strict mode and per-file scopes, so are not affected by the following changes. It is only cases where external scripts have been brought in, or if addon developers have altered the SDK files to remove their strict mode or file scope.

    JavaScript Modules - and Closure Compiler, which Construct uses for minifying code - are both used widely in the industry outside of Construct. So these changes are not specific to Construct: they are also necessary for compatibility with the wider JavaScript ecosystem.

    For users

    If you are using a third-party addon that is broken in modules mode, you can temporarily work around the problem by changing the Scripts type property (in the Advanced section of Project Properties) back to Classic. However this option is deprecated and will be removed in a few months, so you should contact the addon developer and ask them to make a small, quick update according to the information below.

    Strict mode

    JavaScript introduced a new strict mode in around 2011. This avoids common mistakes. See Strict mode on the MDN for more details. The old non-strict mode is called "sloppy" mode and is not recommended.

    Modules mode runs all scripts in strict mode. If a third-party addon developer wrote code relying on features specific to sloppy mode and still had not updated it to use strict mode, it will now need to be updated.

    One example of this is assigning to undeclared global variables is allowed to create a global variable in sloppy mode, but is an error in strict mode (to help catch accidental typos). For example:

    // Assuming 'newVariable' is not declared anywhere else, this is
    // allowed in sloppy mode, but throws an error in strict mode
    newVariable = 10;
    

    If the intent is to create a new global variable, explicitly add a property on the global object instead:

    // Always works
    globalThis.newVariable = 10;
    

    Note: if addon developers have updated their code to work with the new script minifier - a change we announced several months ago in July 2020 - this type of usage should have already been corrected.

    Module scope

    In classic mode, variables declared at the top-level scope are available globally. In modules mode, variables declared at the top-level scope are only available within that module. For example:

    // Classic mode: declares a global variable
    // Module mode: only scoped to this module
    let myGlobal = {};
    

    Once again, the fix to this is to explicitly add properties on the global object:

    // Works in both modes
    globalThis.myGlobal = {};
    

    Once again, this specific type of change is something that should already have been made since we switched to the new script minifier back in July, since Closure Compiler only supports the latter syntax.

    Summary

    In many cases nothing will need to be changed at all. In most other cases there will only need to be one or two lines of code changed.

    For example one addon attempts to declare its namespace via a sloppy mode global assignment, i.e. MyNamespace = {}. Once changed to a proper global property it should work again. The global property can also be declared as a local variable to avoid having to rewrite any more code, e.g.:

    // Make local variable for this script
    const MyNamespace = {};
    
    // Also set as global variable for external calls
    globalThis.MyNamespace = MyNamespace;
    
    // Rest of script probably needs no further changes
    

    Classic mode will be removed in a few months (likely by March 2021), so addon developers should make any necessary tweaks by then.

  • Since SVGs are rasterized, they take up the same memory as a bitmap/PNG image that is the same size they are displayed at.

  • How do I make sure to get a user's approval, or my own for that matter?

    You can't guarantee you'll get the user's approval. They can always decline the permission prompt.

    If you ever decline, the browser may subsequently block all future requests. You may have to go in to your browser settings and adjust the permission manually.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,442,436 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x109
    Coach One of your tutorials has over 1,000 readers
  • x63
    Educator One of your tutorials has over 10,000 readers
  • x3
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x36
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs