Multiple Layers drops the FPS.

Discussion and feedback on Construct 2

Post » Thu Nov 12, 2015 1:14 pm

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.
B
6
Posts: 14
Reputation: 280

Post » Thu Nov 12, 2015 1:26 pm

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.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,498
Reputation: 60,282

Post » Thu Nov 12, 2015 2:15 pm

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.
Scirra Founder
B
400
S
237
G
89
Posts: 24,550
Reputation: 195,537

Post » Thu Nov 12, 2015 2:32 pm

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. :)
B
6
Posts: 14
Reputation: 280

Post » Thu Nov 12, 2015 2:56 pm

@SIDZZERO

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

Code: Select all
h t t p: // w w w.mywebsite.com/mygame.capx
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,498
Reputation: 60,282

Post » Thu Nov 12, 2015 2:59 pm

zenox98 wrote:@SIDZZERO

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

Code: Select all
h t t p: // w w w.mywebsite.com/mygame.capx


...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
B
6
Posts: 14
Reputation: 280

Post » Thu Nov 12, 2015 3:45 pm

@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.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,498
Reputation: 60,282

Post » Thu Nov 12, 2015 4:30 pm

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)

viewtopic.php?f=147&t=150331

the link is an example with capx

i will post screenshoots later
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Post » Thu Nov 12, 2015 4:43 pm

@matrixreal
matrixreal wrote: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)

viewtopic.php?f=147&t=150331

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)
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,498
Reputation: 60,282

Post » Thu Nov 12, 2015 4:58 pm

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
B
46
S
16
G
8
Posts: 794
Reputation: 8,335

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests