Ashley's Forum Posts

  • If you're using a HTML element, either use percentage units, or enable 'Auto font size' and use em units, and then everything should scale the same way the canvas does.

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

  • 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 yes we can, but only if we have a different object type for each hierarchy we want to spawn in!

    Doesn't the new templates feature fix that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't you just use two 'Create object' actions - one for the tilemap and the other for a hierarchy with its content?