Ashley's Recent Forum Activity

  • Press F12, are any errors logged in the browser console?

  • As of r206, projects exported from Construct 3 using script minification are now processed using Google Closure Compiler. Previously it used babel-minify. For the most part this is a compatible change - simple minification works similarly, and advanced minification does property mangling. However there is one change in how Closure Compiler handles global variables.

    Previously we wrote our own property mangler for babel-minify which supported mangling global variables. However Closure Compiler does not support mangling global variables, unless they are written as properties on the global object. For example console.log(MyGlobal) used to work, but now no longer does. Instead use a global property, e.g. console.log(self.MyGlobal) or console.log(globalThis.MyGlobal). (Note don't use window, because it does not exist in worker mode.)

    Here's another example. Previously you may have code like this:

    self.MyGlobal = "hello world";
    console.log(MyGlobal);
    

    The reference to MyGlobal will no longer compile with advanced minification. All you need to do is add self. before any MyGlobal references and it will work again:

    self.MyGlobal = "hello world";
    console.log(self.MyGlobal);
    

    If you use global variables a lot, remember you can refer to them with local variables to help simplify the code, e.g.:

    function UsesGlobalsRepeatedly()
    {
     // Make local variable referring to global variable
     const MyGlobal = self.MyGlobal;
    
     // Use local variable without needing "self."
     console.log("Use 1: ", MyGlobal);
     console.log("Use 2: ", MyGlobal);
     console.log("Use 3: ", MyGlobal);
     console.log("Use 4: ", MyGlobal);
     console.log("Use 5: ", MyGlobal);
    }
    

    For the record, I think Closure Compiler's approach is better. It avoids any chance of difficult name collision bugs when renaming names like MyGlobal, which if the wrong name is chosen, can collide with local variable names. When using self.MyGlobal, it is unambiguous and safer since it can never collide with local variable names.

    Hopefully this will be a straightforward change for any addons that use this type of code. If you have third-party addons that now fail with advanced minification, this is probably the change you need to make.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Losing an hour's work from hardware failure isn't too bad in the grand scheme of things.

    Browser backups are stored internally to the browser, so the only way to recover it is to run the same browser that you made the backup with. If you've moved to another system then I guess you don't have access to that. If there is a way to solve it, I'd guess it'd take longer than an hour, so you may as well just re-do the hour's work that was lost.

  • I don't know what to add, this all looks like internal details about the Box2D physics engine, which is used widely across the game industry. I think it's pretty standard practice to have to adjust the settings of a physics engine to ensure it produces a stable result.

  • This is all managed by Box2D - I can't explain why it happens, it's a third-party library that manages the physics simulation and produces that result.

    I would strongly advise you not to change the framerate mode to unlimited - it will burn up the full system resources, draining battery as fast as possible, overheating laptops, spinning up fans, etc. It exists for performance testing only.

    • Post link icon

    OK, so I finally got round to looking in to this and finally managed to reproduce it. It was a crash in the UI library, but it looked like it came from our code incorrectly cleaning up the Image Points window. I managed to fix that and released an update r278 with the fix. Hopefully that will solve it, let me know how it works for you. And hopefully there aren't any more "random crash" type issues...

  • Set the color to white to use the original colors.

  • On desktop if you see this happen, does resizing the browser window bring the dialog back?

  • I must point out that for any important digital work, you should make regular backups to avoid data loss in the event of any software/hardware failure, fire, theft, flood, etc.

  • Chrome has experimental support for accessing the file system which should come to stable release by the end of the year. You can use this to reload all the files from a folder-based project while the editor is still open. However the security model makes it very difficult to load from arbitrary file paths on disk - only files the user has explicitly approved access to can be read. That's why it's done by reloading from the files in the project folder, since those files can be accessed.

  • It's an issue we fixed in the latest beta.

  • Press F12 and check for any errors in the browser console. It's hard to help without more information, and usually detailed information is logged there.

    Alternatively try just saving the project a different way.

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 3 Mar, 2025

Twitter
Ashley has 1,445,426 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