Ashley's Forum Posts

  • This is actually a good question: there's a <script> tag in main.html, but the script is not actually executed. It turns out the HTML specification says that scripts inserted as HTML strings are not executed. (I'm not sure why - scripts in attributes like 'onclick' can still run, so this rule doesn't completely block JS execution.)

    It seems that in Construct it would be useful to allow such scripts to run, so projects like yours work as expected. The limitation can be worked around to force inserted scripts to run, and I've done that for the next beta, which fixes your example.

  • I am using version r251-2.

    Is there a reason you're staying on an old and out-of-date release? I would suggest updating to the latest version.

    The build server is only configured for the most recent release. If old releases have a problem we will not maintain them. If you really need to do builds with old releases for some reason, use the Cordova CLI to configure your own builds.

  • I wouldn't add your own script tag like that, as it will only make things harder. Writing all your script code in Construct will make it easier.

    This and much more is covered in the Learn JavaScript in Construct tutorial series.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ViewportLeft("Hud")+ViewportRight("Hud")/2

    This calculation is incorrect - division has higher precedence than addition so it will actually calculate ViewportLeft("Hud") + (ViewportRight("Hud") / 2). If you want the mid-point you need to use (ViewportLeft("Hud") + ViewportRight("Hud")) / 2.

  • A sprite is essentially a regular mesh with four points. If you make a mesh with 10 x 10 points, it has 100 points, which is roughly equivalent to 25 sprites in overhead. So the overhead of a mesh depends on how many points you use.

  • Only WebM Opus files are guaranteed to play on all platforms. If you skipped encoding, it would mean audio may not play on some platforms, so you probably don't actually want to do that.

  • Are all available software updates installed? Make sure Chrome and the Android WebView (whichever are installed) are also up-to-date in the Google Play store.

    If everything's on the latest version, then unfortunately some devices have broken graphics drivers, which is what the glitches and crash may be caused by. Sadly there's little anyone can do about that - the device manufacturer would need to fix it, but old devices rarely get software updates. If that's the case then at least it's device-specific - other devices should not be affected.

  • Small sprites stretched larger will use less memory. Only the source image needs to be kept in memory; stretching it larger does not use more memory.

    That is not true of SVG though. SVG will be re-rastered at the draw size and use roughly as much memory as its displayed size requires.

    In general sprites are the fastest game design primitive in Construct.

  • I'm afraid we will not share internal source code, and I don't believe it's relevant to the case you described anyway: just use fetch().

    • Post link icon

    Please post in English as per the Forum & Community guidelines.

  • Consider taking the free Learn JavaScript in Construct tutorial series, which answers questions like these.

  • There are already features that help solve this as described in the tutorial Using 3D in Construct.

  • The way updates are handled is described in the tutorial Offline games in Construct 3.

    As it notes there, offline.json must be re-uploaded with every change, as that file must change for Construct to download a new update.

  • Why? If it's a small amount of code, pick the right tool for the job, and the JavaScript coding feature is probably better for that.

  • All my old games use web storage and only run on r251.2

    Web Storage was replaced by Local Storage about 7 years ago. It happened in Construct 2, before Construct 3 was even out. If you keep using retired features for years and years, you will inevitably run in to problems. This is why you should make an active effort to move away from deprecated features.

    Having said that, we haven't touched the Web Storage plugin ourselves for years, so I doubt anything changed on our side. I wouldn't be surprised if some browser change broke it - perhaps browsers are finally removing it, as it was replaced by better storage solutions years ago.

    You're probably best off just using the Cordova CLI and doing your own builds locally with a custom configuration. The build service is configured to work with the latest release, and if that ends up breaking old releases, we probably can't do much about it.