Hiding layers and performance?

Get help using Construct 2

Post » Sun Dec 07, 2014 9:25 am

Do hidden layers affect game performance? The objects are created but hidden on layers, then the layers hidden or shown when needed.

Is it better to create the objects as you need them?
Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619

Post » Sun Dec 07, 2014 10:00 am

Just because they are invisible, doesn't mean they might not still be checking for collisions, calculating their current positions etc...so I guess it depends on the situation (especially behaviors and events involved)

I guess the best way to find out for sure would be to create a really exaggerated benchmarking project with an on-screen FPS counter.. starting with 2 visible layers loaded with sprites, and the ability to hide or destroy one of the layers...you might also want to make it so you could also start all the sprites on the hidden layer to start rotating and/or moving as well. This should answer your question in no uncertain terms.. I also suggest testing this benchmarking program on your target devices to see if the deference is more extreme on any given platform.

Best of luck,
Mike
B
49
S
9
G
4
Posts: 426
Reputation: 7,071

Post » Sun Dec 07, 2014 10:40 am

Yeah I was just wondering if anyone knew how it was handled or had looked into it before.
Some games: https://play.google.com/store/search?q= ... s&hl=en_GB Feel free to show the panda some support, he would appreciate it :)
B
19
S
5
G
1
Posts: 155
Reputation: 1,619

Post » Sun Dec 07, 2014 2:14 pm

The best answer to any performance question is always just to measure it and see.
Scirra Founder
B
399
S
236
G
89
Posts: 24,523
Reputation: 195,378

Post » Sun Dec 07, 2014 4:33 pm

If you want to increase performance I guess creating all your events in groups could help a lot, so any specific action will be read only when necessary
B
56
S
21
G
3
Posts: 602
Reputation: 6,612


Return to How do I....?

Who is online

Users browsing this forum: Christmas and 34 guests