Effects (brightness and stuff) and performance ?

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

    I have about 100 moving sprites on my project. I had some performance problems that bothered me and I figured out it was the brightess effect I added on them that was slowing down my game.

    While trying to fix that I learned that a brightness effect with the default value of 100, which make no visual change, uses a lot of CPU too, which is kind of surprising but whatever.

    So I was wondering how I can know how much CPU intensive are the different effects ? And is it possible to achieve an effect similar to brightness, but with better performances ?

  • Two things:

    1. Effects tax the GPU, not the CPU, and most effects will give you the same performance regardless of parameter values.

    2. The only way to know how an effect will perform is to test it -- there really aren't any shortcuts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • A shame that a modern GPU won't be able to brighten 100 two dimensional sprites while it runs smoothly games with 3D graphics.

  • I actually had this problem as well at some point, which also killed one of my games. However you can add the effect to the layer instead of the objects. That will improve performance by a lot.

  • A shame that a modern GPU won't be able to brighten 100 two dimensional sprites while it runs smoothly games with 3D graphics.

    It really depends on the GPU. My desktop can handle a couple thousand sprites with the brightness effect before performance begins to drop. Mobile GPUs, on the other hand, are notoriously under powered in comparison.

  • nimos : thank you for this workaround, I'll try this

    linkman2004 : I have a geforce GTX 560M. It can run Skyrim, but not too much brightness in Construct 2. Meh.

  • It may depend a good deal on the sequencing - i.e. stacking order of the sprites with effects. Also how often the effect itself changes. In my testing I could have, for example. 5000 sprites with a Shader on them at ~30fps, but it gets cut in half if the parameters change every tick.

    You basically need to experiment.

    As was said you could try and use layers - for example have a layer that always has a max brightness effect and move the sprites to the layer on hit, then move them back.

    Basically what Ashley always says applies - test it to see if it's fast or slow, when it gets quick you have the right approach.

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