Performance question

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

    What is most effective performance wise (FPS)

    Premise: 600+ sprites. Sometimes less, sometimes more. This can't be changed.

    Original: Fade behaviour.

    Disabled in main gameplay, but enabled in level loading/unloading.

    (the loading/unloading is when the stage is filled with the gameplay tiles one by one by random, fading them in/out in succession, using the Fade behavior)

    OR

    Replacement 1: Replace the Fade with custom made dedicated fun animation, 4 frames, 15 different animations, so 4*15.

    OR

    Replacement 2: Replace the Fade with custom events, changing object's opacity manually and using tween plugin.

    OR

    Replacement 3: Make a new sprite object with same content, with the effect enabled there, and once finished destroy those sprites and replace with the effects-less gameplay sprites.

    Those three replacement solutions require more events (exact number vary depending on solution).

    But those events are only run at load/unloading stage and the events are completely disabled in gameplay.

    So the question is:

    Will Fade tank FPS even if it is not actively used?

    (My guess that the Fade Behavior is kind of a merge of a simple Tween and Opacity)

    Or is it so that it is mostly the WebGL effects and/or actively in use that will effect performance?

    Thank you. I am trying to optimize my game as much as I can. On heavier levels it goes down to 52-54 fps at some moments, on i7-6700k 4GHz cpu (and Geforce 970 GTS) but mostly often it hovers around 57-59 fps.

    EDIT: Rereading I think it is not tanking much, because I mistook it for Effect but is actually Behavior. I have edited the text from "Effect" to "Behavior" now.

  • The memory usage is? The problem will be with 600+ sprites with animations not the Fade behaviour which is just changing opacity of the object.

  • Ah ok!

    *googled, found the memory documentation*

    Then question is, is this much?

    The sprites are:

    32x32*4 = 4096 byte per tile, and then times 600 circa, 2457600 bytes... 2,5 mb.

    Doesn't sound much. But maybe I should include ALL the animation frames too in above equation too? (above I just took the "current" frame")

    Then it will go up A LOT.

    *counting*

    86 frames.

    32*32*4 * 600 * 86?

    211 megabytes? hmm. That's a bit different.

    (I think I can optimize down to 80 frames)

  • What is the memory usage it should show it in debug preview

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh I see. "7.4 mb images" on the level screen.

    It is consistent no matter level size/number of graphic tiles. (on the smaller end being 200 objects and the heaviest level at 780 objects, but averaging 400-600 I think!)

  • That's great then, 7mb is very low. Your objects must be using the same graphics.

  • Good to know!

    Yeah lots of sprites are repeated.

    I think it must be on the events side that it is taking CPU.

    I have done many waves of optimizations, but I will try again. It is hard when it is a puzzle where every tile act in one particular way depending on what the neighboring tiles do, every 0.2 second.

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