Multiple Layers drops the FPS.

0 favourites
From the Asset Store
320 high-quality cinematic sound effects for trailers and game scenes.
  • Hi, I am doing a simple project(for PC),hidden object like game,where I have the Background on bottom LAYER-0,and other objects on LAYER-1.I have some 27 objects with average FPS of 50 with all the logic written in the event sheet. Now I add one more layer(LAYER-3) like an instance where an object is inside a cupboard,so when i click it ,the cupboard opens and then I can pick the object from inside it.Now when i check my fps its drops to 30 fps.I checked all places where this problem could come from but of no use.I even deleted the entire event sheet just to be sure that the programming logic might be wrong ,but of no use also.But then when I deleted this new LAYER -3.The fps improved back to 50.

    (This layer-3 actually contains only 2 cupboard sprites so far).So might doubt is instead of using layers ,can I use Z ordering.Will it improve my FPS.

    P.S-I haven't tried Z ordering since its a paid feature ,which I might have to go for if things don't work out.

  • I have a game with over 15 Layers so I doubt that's the issue, especially since you appear to be using the free version.

    Without seeing what you've done - i.e. providing the .capx would make it much quicker and easier - then we can only guess.

  • Layers have no performance impact unless you change the layer opacity, blend mode, enable "force own texture", or add WebGL effects. Otherwise there is no reason for layers to reduce performance. Share a .capx if you want anyone to take a closer look.

  • Hi,

    I am knew to construct 2,so yes your right I am doing something seriously wrong at the basics. I have done a dummy project ,it contains 5 sprites on different layers in "layout 0" and I get a very low fps here(30ish) while another "layout 1",where all those sprites are on the same layer i get 50 ish fps. This is similar to what I am trying to achieve with the original code .

    I cannot post links yet due to restriction .

    I have already done the above changes like "force down texture","webgl on" but of no effects.If you can do a dummy project of what I want stated above, I can compare,since as of now I am stuck as I can post and provide more information.

    Sorry for inconvenience and thanks for the help so far.

  • SIDZZERO

    You can bypass the posting restriction by inserting characters in the URL, such as a few spaces, e.g.

    h t t p: // w w w.mywebsite.com/mygame.capx[/code:39jmk4n1]
  • SIDZZERO

    You can bypass the posting restriction by inserting characters in the URL, such as a few spaces, e.g.

    h t t p: // w w w.mywebsite.com/mygame.capx[/code:3n3v3mfj]
    

    ...I feel so dumb...Thanks....here it is...let me know,

    h t t p s : / / w w w.dropbox.com/s/ntx3zw6zeqe6ttw/testproject.zip?dl=0

  • SIDZZERO

    Ok. Got your project but what am I meant to be seeing?

    I've added multiple Layers to each Layout (up to 10) and I'm not seeing any difference in FPS when running in Debug.

    What am I meant to do to re-create your problem?

    Maybe it may be easier if you post your project that has the FPS drop already.

  • Hi,

    i already report it and no one replys except zenox98

    Adding 1 layer (+ the original layer) will decrease the fsp and increase cpu usage)

    the link is an example with capx

    i will post screenshoots later

  • matrixreal

    Hi,

    i already report it and no one replys except zenox98

    Adding 1 layer (+ the original layer) will decrease the fsp and increase cpu usage)

    the link is an example with capx

    i will post screenshoots later

    Sorry - lost track of this. Just tried to run your .capx but it has 2 plugins from cranberry that I don't have. Any chance you can re-upload without the plugins? (please use your original thread so we can keep the issues separate for now)

  • Hi,

    here is simple capx https://www.dropbox.com/s/iqfd7isklvryo ... .capx?dl=0

    just preview it like that .... and see the different with remove the layer 1

    results

    screenshoot 1 > without layer > fsp 51 cpu 15% http://hpics.li/d16bc66

    screenshoot 2 > with layer > fsp 27 cpu 49% http://hpics.li/fbe87da

  • I'm not seeing an difference. Tested in Firefox 42.0, IE 11 and latest NW.js - 60 fps.

    Tried running in Debug and also added a text box set to show FPS. Sorry- just not getting any problem.

    Can anyone else please try this and report back please.

    What OS/browser/GPU have you got?

  • SIDZZERO

    Ok. Got your project but what am I meant to be seeing?

    I've added multiple Layers to each Layout (up to 10) and I'm not seeing any difference in FPS when running in Debug.

    What am I meant to do to re-create your problem?

    Maybe it may be easier if you post your project that has the FPS drop already.

    Hi Zenox98,

    Here is a detail description,

    Layout 1-It has 5 sprites in different 4 different layers.This layout has totally 4 layers.

    Layout 2-It has 5 sprites in the same layer.And this layout has totally only one layer.

    My issues is when we ,

    -Select layout 1 and Play in debug mode the FPS is very low(<=30fps).

    -Select layout 2 and Play in debug mode the FPS is proper here(50 fps).

    My doubt is why is the FPS dropping,when I add these sprites in different layers.And when I add them in the

    same layer the FPS is normal.

    P.S-My issues sounds kinda similar to the other post from matrixguy,maybe not sure.

  • SIDZZERO

    In that case, my post stands. I'm just not seeing any problem. We're going to need more testers.

    What OS/GPU/browser are you using?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tested on Firefox, NW.js and Chrome. Constant 60 FPS.

    SIDZZERO Have you tried switching form the Inspect tab on the debugger to another tab? Sometimes the Inspect tab gives a false FPS reading.

  • I thought I'd give it a test too just for more results.

    With the layer: 60 fps, 11% cpu

    Withou the layer: 60fps, 3% cpu

    And adding more layers can slow it to a crawl.

    The problem, however, is the actual debugger. Switch over to the "Watch" tab in the debugger instead of "Inspect". I can have 30 layers added onto your project and not exceed 1% CPU use. The Inspect tab keeps track of a lot of stuff. It's meant for really detailed display of everything going on under the hood, whereas Watch is a bit closer to an actual gameplay environment. I use Inspect to pick the variables and values I want to watch (with the eyeball) and then just check that stuff in Watch so not everything needs to be accounted for.

    Fore reference, Core i7-4770 3.4 GHz, NVidia GT 640 4GB, 32 GB Ram. This was Chrome on Windows 10.

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