Ashley's Forum Posts

  • I'm afraid as in this case it's often not possible to tell what went wrong from only a log. It could be a problem caused by a third-party addon your project uses, in which case you'd need to contact the addon developer for support. Otherwise if it's only using Construct official features, we'd need a full bug report to investigate (including e.g. a sample project).

  • Construct can run in a Web Worker where window is not defined. However in this case the solution is simple: use globalThis instead - globalThis.location.href works in both the DOM and Web Workers. In general, for this reason, always use globalThis instead of window.

  • I suspect that other games you've seen that appear to be running in the background are in fact using either the timer-based approach or catch-up-time approaches that Construct can also support. Any app that genuinely runs constantly in the background will do things like spin up laptop fans and drain battery, which people don't like and usually leave negative reviews for, and it's unnecessary and wasteful compared to the other approaches.

  • You need to include the subfolder path in folders mode, e.g. if the sound effect "sfx" is in the folder "myfolder", use "myfolder/sfx" instead of just "sfx". This is all covered in the manual guide on deprecated features.

  • Browsers basically forcibly suspend any content in the background to prevent them draining system resources and wasting battery. There isn't usually any way for web content to work around this.

    You can still make projects which seem to progress in the background though by using other workarounds - see the offline builder for one timer-based example that even works when the browser is entirely closed, and catch-up time which basically runs in fast-forward when you return to the tab. Either way you get the best of both worlds: it doesn't need to waste system resources while in the background, and it still looks and works as if it was running in the background.

  • Note that in general if you have a feature request you can submit it here.

  • See the Learn JavaScript in Construct course or the quick-start guide which covers the basics of accessing objects from JavaScript. I'd also recommend using TypeScript which will catch coding mistakes like this for you so probably save a lot of trouble.

  • https://www.hyperspaces.co.uk/device/

    I tried that on my PC display and got out a ruler to check, and it claims to be 25.4mm, but measures more like 33mm. So it's not very accurate!

    Anything which involves "maintain a database of all known devices in existence" is probably not a very good solution anyway...

  • This guide has some advice about importing third-party scripts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There have been no changes to Construct's IAP plugin in the latest release cycle. The last change was in r394 back in June which updated the underlying Cordova plugin version. So if you were already using r397.2 stable and updated to r407, there have not been any changes to IAP.

  • Isn't that correct though? If you scale up the display to make everything larger, it in effect gives you a smaller screen size for the same size content, and so content should adapt accordingly. If you could ignore that effect, then you could make an app that keeps everything the same size ignoring the system display scale, which then defeats the purpose of changing the system display scale.

  • Normally you shouldn't set a minimum delta time at all. You don't want your game to start running in fast-forward if it goes over 60 FPS - what if someone has a 120 Hz display? It's intended to only be set for things like catch-up time.

  • There's no way to identify the real physical screen size, at least from information browsers give you. How do you know if the display is a colossal display used by the stage at a concert, or a desktop monitor? There may be no difference in the resolution or device pixel ratio in either case.

    On mobile devices, your best bet is probably just to rely on the screen size reported by Platform Info. That is in CSS pixels so does not vary with the device pixel ratio, and so you can probably work on the assumption CSS pixels are about the same physical size across devices, and so the screen size is a rough indication of the display size.

  • You do not have permission to view this post

  • What's the point of allowing developers to define their own c3runtime/main.js if other different files are automatically searched anyway?

    Construct only looks for files that your addon configures. But the default configuration includes runtime files plugin.js, type.js, instance.js etc. If you don't want the default configuration, call SetC3RuntimeScripts() with an array of just the script files you want to use.