Top Layer

0 favourites
  • 11 posts
From the Asset Store
Set of tiles to create a map for top-down games with island theme
  • I have no issue with pulling an object to the top of a layer, but is there a way to move an object to the upper most layer?

    Say for example I have an object that will blackout the screen. I could go through each level creating a layer specifically for this, but I would rather just add it to the layers already created.

    In my experience, performance tends to get worse when I have more layers.

    Example:

    Start of level - Create black out on layer (uppermost layer).

  • Do it via numbers! All layers automatically get assigned a number. (Create on layer 0 for the topmost i think) :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In my experience, performance tends to get worse when I have more layers.

    You may want to post a bug report if this is the case, as Ashley specifically states in the manual HERE that:

    "Number of layers usually has no effect, unless most of the layers have changed their opacity, have effects applied, have a blend mode other than 'Normal', or use 'force own texture'. However typically there is no performance impact from using multiple layers with default settings."

    I've got a test going on at the moment and have 10 layers just for parallax effects. Seems to run fine for me.

  • Do it via numbers! All layers automatically get assigned a number. (Create on layer 0 for the topmost i think) :)

    Jase00 I was under the impression 0 was the lowest layer.

    zenox98 I mentioned this quite a few times over the last few months. I once had loads of layers (around 20), and was getting awful results on mobile. I managed to get this down to 4, and ended up with pretty smooth results.

    I wouldn't have thought it was a bug though...

  • You can create or move an existing object to any layer using a string with the layer's name.

    System > Create object.

    Object > Move to layer.

  • thiago

    Do you know how to guarantee it's always the top most layout if you don't know the names?

  • I guess you can use a very big number like 99, so it will send the object to higher layer before 99.

  • I think you should know what the top layer is because I don't think you're able to create layers once the game is running.

  • thiago I wonder if that would work. I'll have a try a bit later.

    Yes, but my point is, some levels are going to have more layers than others, and not all layers may have the same name. I can go through each layer and ensure I either change the name or memorize it for the event setup, or I could just have the action occur to the uppermost layer.

    I am going to assume this isn't yet possible.

    Not a problem. I'm not yet at a position where this would be an issue. Just a shame, as I thought it's something that made sense.

  • Does it not make sense to have a layer with the same name in every layout that always exists as the top layer?

  • Yes, I suppose it does, but I'm just thinking ahead, and trying to keep my number of layers to a bare minimum.

    My top layer is usually "HUD", but at the point I am in the game atm, I am trying to set up the events before all of the graphics are done, so I'll probably have to go through and change a lot of events. I know I want my blackout to always be on top, and so I hoped there was a simple option for me.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)