Drawback to having a lot of layers

Discussion and feedback on Construct 2

Post » Mon Aug 15, 2016 2:01 pm

Hi,

I'm currently working on a project that would require a big number of layers.

Is there an effect on performance if my layout has 'too' much layers (ex: 50)?

Thanks in advance :) .

Nic
B
5
Posts: 12
Reputation: 249

Post » Mon Aug 15, 2016 2:05 pm

Overdraw is the only real possibility and that's only with a lot of 'force own texture' layers or effects. That's more of a mobile problem, though. You shouldn't really have any problems on PC.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Wed Aug 17, 2016 5:13 pm

I noticed that every layer has properties rendered in the debug console.

Does these properties requires alot to calculate and would having lots of them slow down my game?
B
5
Posts: 12
Reputation: 249

Post » Thu Aug 18, 2016 1:53 am

nlacroixcforp wrote:I noticed that every layer has properties rendered in the debug console.

Does these properties requires alot to calculate and would having lots of them slow down my game?


I use a lot of layers and it hasn't been a problem. Remember that debug is always slower than actually running the game--not all of that stuff you see in there is displayed constantly at runtime. I don't think I've gone past 30 layers, but the layers are just containers of objects. Nothing more. They're functionally identical to putting all of the objects on the same layer and possibly multiplying movement and positions to account for parallax values. Effects and Force Own Texture layers are the only instance where that's different because then that layer is rendered by itself and then placed with the other layers.

So just try it out, run tests, and change things if it doesn't work.
B
103
S
38
G
19
Posts: 962
Reputation: 17,996

Post » Thu Aug 18, 2016 11:59 am

C-7 wrote:
nlacroixcforp wrote:I noticed that every layer has properties rendered in the debug console.

Does these properties requires alot to calculate and would having lots of them slow down my game?


I use a lot of layers and it hasn't been a problem. Remember that debug is always slower than actually running the game--not all of that stuff you see in there is displayed constantly at runtime. I don't think I've gone past 30 layers, but the layers are just containers of objects. Nothing more. They're functionally identical to putting all of the objects on the same layer and possibly multiplying movement and positions to account for parallax values. Effects and Force Own Texture layers are the only instance where that's different because then that layer is rendered by itself and then placed with the other layers.

So just try it out, run tests, and change things if it doesn't work.



Thanks alot for your advices! :)
B
5
Posts: 12
Reputation: 249


Return to Construct 2 General

Who is online

Users browsing this forum: lexchoi0810 and 6 guests