Performance question, layout and Z-Order

0 favourites
  • 7 posts
From the Asset Store
Firebase: Analytics, Dynamic Links, Remote Config, Performance, Crashlytics on Android, iOS & Web Browser
  • Hello,

    I am building a webapp using Construct 2. I am afraid that the way I'm creating all the app is not performance-friendly.

    Instead of using multiple layouts, I am just using one single layout.

    Pressing buttons to change between pages from the app is just switching Z-Order of sprites,texts and other stuff...

    About performance, if I am keeping all my sprites inside the user view but only some are actually seen (like tileset size of screen on top of others sprites) are only those seen being draw to the screen, or even those on the Z-order bottom are being processed?? If so (i think that it is the case), what's is the best way to avoid this ? Multiple layouts ? Moving sprites off-screen?

    Thanks!

  • Without example Capx it's always a bit hit/miss to give any performance hints. Have you checked this with multiple browsers and with debug window active.. With it, you should be able to see what's taking the time.

    As far as I know .. all active (marked visible) objects that are at the visible screen area are drawn. So IMHO it would be smarter to move unused elements outside the visible screen instead just hiding them behind the background.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's not slow... yet.

    Maybe this, making things invisible, would solve my problem...

    I don't know the debug window you talk about.

  • Bump! And I realized that I am on the wrong section, this should be in "General Discussion"...

  • When you use Construct 2, there are two buttons at the top one next another.

    Left one is "run layout", that opens your game at the browser normally.

    Right one is "debug layout" which opens the game with a debug window attached. Debug window (bellow your game) show a lot useful info of the game, like cpu usage, frame rate...

  • Performance tips (notes points like the number of layouts does not affect performance)

    Optimisation: don't waste your time (you probably shouldn't worry about it already)

  • I'm aware of those tips Ashley.

    Weird that I can't find the debug icon or option. My construct license is the early adopter.

    I am aiming to mobile webapp, so this is important. I have around 100 objects (sprites, sprite-font,etc). This was enough to slowdown my iphone 4 safari's performance.

    I imagine that the process that handles the graphical drawing can't calculate whether or not some object is or isn't visible if laying behind other objects (Z-Order). In that case everything must be drawn.

    I did a bit tedious job to add besides moving top/bottom of layers, to enable/disable visibility.

    And once again I can press a button on iPhone and feel no delays, much more responsive! So, whenever you can, you should set invisible what you don't want to see. Don't know if the out of screen position trick works. The next optimization here should be to also disable all collisions of those invisible objects.

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