Ashley's Recent Forum Activity

  • It's not clear exactly what you're doing, are you trying to load locally bundled resources in a custom webview? If so that's actually very tricky and requires a bunch of customisation to get it working. The existing mobile exporters handle all of that using Cordova to do the heavy lifting to make things work. I would recommend using that if you can. Otherwise the next easiest thing to do is publish the content of the webview to a public URL and point the webview at that.

  • Use a loader layout.

  • That code uses undocumented internals of the runtime. Do not do that! It can and will break at any time and we will not provide any support either.

  • I would recommend taking the Learn JavaScript in Construct tutorial series which covers many of these questions.

  • It doesn't matter so long as the encoding completes successfully.

  • Using quotes for strings only applies to expressions and nothing else. The manual only mentions them in the section for Expressions, they're never mentioned anywhere else, because nothing else is an expression. You can't type something like "foo" & number in a property value, nor do you need to name objects "Sprite" in the Properties Bar - you just type Sprite. To help make that clearer I added a note to the expressions manual entry:

    Using quotes for strings only applies to expressions. Don't use them in other places like in property values in the Properties Bar.

  • See the manual section on Scripts in event sheets, in particular:

    Remember that the event sheet runs all events in top-to-bottom order every tick, so a script in a block at the top level of an event sheet is run every tick (as if it was an action in an Every tick event). Often it is more useful to use script blocks as sub-events, which only run if their parent event block was true.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I tested it recently and audio was playing on iOS, and as far as I'm aware it's working fine for everyone else.

  • I've referred to 3D Math Primer for Graphics and Game Development while developing parts of Construct. Like most resources it tries to be language agnostic and focus on the maths, as that is applicable to any technology. And it looks like the whole thing is available free online now as well!

  • I think falling back to the default instance is reasonable if the given template does not exist. Construct's design tends to be forgiving and try to do the right thing anyway even if invalid parameters are specified. Simply not doing something can itself be confusing, and end up in bug reports like "why isn't anything created?", and cause refactoring problems like if you delete/rename a template, then suddenly no objects are being created any more, which could well be worse than falling back to default parameters.

    Even with layers, IIRC if you specify a layer number instead of a layer name, it will clamp the number to the available layers and always create an instance. It's only if you specify a name and the name doesn't exist that it finally gives up as there isn't anything else reasonable it can do.

    I think a better approach might be some kind of warning if you specify a template that doesn't exist. That could apply to an invalid layer name too (although that is harder to verify as it depends on the associated layout, which depends on event sheet includes).

  • Use the system viewport expressions to identify the middle of the visible area taking in to account scrolling, scale etc. You must pass a layer to take in to account the layer transform. (ViewportLeft("Layer 0") + ViewportRight("Layer 0")) / 2 will the X co-ordinate of the middle of the screen for "Layer 0", and (ViewportTop("Layer 0") + ViewportBottom("Layer 0")) / 2 the Y co-ordinate.

  • As noted in the manual entry, HTML elements like Button are placed on top of the main canvas element, so none of the canvas content can overlap them.

Ashley's avatar

Ashley

Online Now
Early Adopter

Member since 21 May, 2007
Last online 11 Feb, 2025

Twitter
Ashley has 1,430,449 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
  • x108
    Coach One of your tutorials has over 1,000 readers
  • x62
    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