A lot of LAYERS

  • Hello! Can someone tell me, is there any really difference in use of many layers in Construct 2 and why they slow down performance? The reason why I am asking this is that I opened built-in source file of game Space Blaster and tested it on my Android tablet Ainol Aurora 2. It was great, smooth 50-52 fps. Then I add 20 fully empty layers in this project, compiled it and tested again on same device. The result was different: max 46 fps and often fps drops to 24.

  • Layers are things to load... over the entire screen...

    but I'm surprised at how low it went with 20 layers... (Although you should never need 20 0_0)

  • You have to realize Layers although empty do contain information. So if you have a ton of them it is going to eat at your processing power. When you create a layer it basically creates an image the size of the layout. Transparent or not it is still there in memory. So every time you add a layer to a 1280,720 project it's like adding a 1280,720 image. At least that is how I understand it.

  • Here is a quote from Ashleys article on Performance Tips:

    [quote:20qhpj29]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.

    So if you are really seeing such a performance drop, it might be worthwhile posting a minimal bug report showing the before and after .capx.

  • Maybe Ashley will tell us something about it?) All of 20 layers have DEFAULT settings, NO opacity changed, No effects applied, NO blend mode other than 'Normal', NO use 'force own texture'

  • Layers are things to load... over the entire screen...

    but I'm surprised at how low it went with 20 layers... (Although you should never need 20 0_0)

    It's very comfortable to work with objects on them. For example, I have every menu window on different layer.

  • 20 empty layers should use effectively zero CPU, GPU and memory. An empty layer is basically no overhead at all. So adding 20 empty layers should not have any measurable impact at all. My main suspicion is that there is variance in your test measurements, but if you think there is good evidence there is a measurable impact, please file a bug report.

  • 20 empty layers should use effectively zero CPU, GPU and memory. An empty layer is basically no overhead at all. So adding 20 empty layers should not have any measurable impact at all. My main suspicion is that there is variance in your test measurements, but if you think there is good evidence there is a measurable impact, please file a bug report.

    I will try this test again and report in case of same result. Thank you for answer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I also have the same issue, I added only 3 layers and it reduced the framerate significantly....

    40% CPU usage and 45FPS, same result even after deleting objects from layers...

    Anybody got the solution ?

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