Ashley's Recent Forum Activity

  • 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.

  • It's handled automatically by the OS. It will choose whichever CPU best balances performance vs. battery life. For a demanding game I would assume it will automatically choose the high-performance CPU.

  • The link is not public. Besides, we usually need a full report following all the guidelines to be able to investigate, so please file an issue as I previously advised anyway.

    For what it's worth, I just tried an APK build of one of Construct's templates and it worked fine.

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

    This is our standard response because we routinely cannot reproduce issues based on comments and forum posts alone. We have a carefully designed process around issue reports that is designed to maximise the chance the problem can actually be solved.

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

  • The "minimal-ui" error doesn't matter and can be ignored.

    There's nothing significiant in the rest of the log either, so there's very little to go on. As ever you should share more detailed information such as the devices tested, software versions, a sample project, etc.

  • It should work. If it doesn't, please file an issue following all the guidelines.

  • You must have done something else, like visit it directly or visited an older beta release, because stable releases do not notify you about beta releases unless you have changed the settings. I just checked to verify this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • We're using an experimental new feature in Chrome (Local Font Access) to support the ability to pick fonts for the Text object from a full list of all locally available fonts.

    Where it's supported

    To use the experiment you will need to use:

    • Google Chrome 88+
    • Construct 3 r225+
      • In stable releases, tick Enable experimental features in Settings
      • In beta releases, it's enabled by default

    How it works

    When the feature is supported, the font picker dialog for the Text object will prompt for permission to access local fonts. If you approve the prompt, then the list of local fonts is filled with a comprehensive list of all available fonts installed on your system. Without this feature Construct guesses a list of fonts, which is usually incomplete.

    Feedback

    Let us know if you have any thoughts about this! You can use this thread for general discussion about the feature. If you find a bug or a crash with it, please file an issue on the issue tracker as usual, following all the guidelines to ensure we can help.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,768,514 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
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    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
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs