0 Favourites

Desktop low FPS or what am I doing wrong.

  • I am testing Construct 2 and I have a problem. I am doing a big game for desktop with lots of sprites and big juicy effects. I have no problems with blasts but when it comes down to fire effects(On turrets are destroyed they spawn 3 sprites every tick to represent fire) I have big FPS drop even on my powerfull PC.

    So my question is can Construct 2 handle really large amount of sprites(With Addictive blend) like effects? And what are limitations for things like that?

  • Hi -

    hard to say without more details, but here's a few generic performance tips :

    • check the version of your browser and graphics card driver, to make sure you're running hardware acceleration, and not a software renderer
    • use the debug pane to inspect how many entities your scene has, or which are the most expensive. A simple mistake in the logic or scene management could lead to a situation you're not expecting (lots of expensive entities outside of the viewport, etc.)
    • check your entities are running only the logic they need ; it's possible you have physics or collisions, or similar service enabled on objects that don't need it
    • try to isolate the problem by disabling bits of logic or gameplay. Collision, AI, effects, etc.
    • resource management ; it's possible to create simple "naive" situations that are complete perf killers, i.e. geometry that cannot be batched. E.g. "bad" effects with "unique" particles, or unique effects on sprites, etc.

    So... no easy answer, but the general approach is 1. narrow it down. 2. identify perf bottleneck 3. fix perf killer 4. repeat

    'hope that helps a bit.

  • You might also want to look into profiling tools (such as Chrome DevTools, Speed Tracer, etc.) ; it might be difficult to link the result of your perf analysis to the structure of your C2 project, but it might give you an hint.

  • Thanks for reply, I am still testing a problem.

    But I have a question. I am using Node-Webkit and I just want to know is there limitations for heavy effects for desktops? In case if logic is good.

    And how exectly I have to check hardware render& Is there any options for that? Sorry if it's a dumb question, but I am not good with technical things.

  • Meh, no computer can handle this method you are using to actually represent the fire, every tick means always, so it will spam lots and lots of sprites on screen, 60 fps = 60 ticks X 3 Sprites = 180 sprites per sec with additive blend! No computer can handle this! if you want to use juicy effects i suggest to use the particle object, or you can also pre-render the particle effects, that way your game will run smoothly. On this way the truth is that no framework can handle this what you are doing.

    I belive this will be helpfull:

    read this: https://www.scirra.com/manual/134/performance-tips

    and this: https://www.scirra.com/blog/112/remembe ... our-memory

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Yea I understand that lots of sprites is no good, but on the COnstruct Classic it was not a problem. So I would like to know is Construct 2 have other methods for such things.

    And what about pre-render effect? How can I do it?

  • Well, the cheapest way to achieve nice effects is pre-rendering your particles with animations, for example let's say a explosion animation with 10 frames on 64x64, or either way you can make your own mini particle system spamming sprites every 0.2-0.3 seconds, put a fade out behavior on the particle object at the start. Construct Classic it's different because it used another renderer, it was made with directx, Construct2 Works with Webgl wich is indeed Opengl. they are very differents in matters of rendering

  • I never used Construct Classic, so I can't really comment on that - but as elisamuelps already pointed out simply by running the numbers, switching your effects to simple particle systems or animated sprites sounds like a good easy win.

    If your effects are causing the slow-downs, you need to find a way to re-create a similar effect more efficiently. This usually means less naive resource handling, less objects, less object creation/destruction, more sharing between objects, etc.

  • Here's an example of "pre-rendered" effect with an animated particle used for an explosion :

    (grrr, can't post URLs apparently)

    opengameart.org/content/explosion-animated

    just add the http: ...

  • Thanks everyone, I will continue my little tests with such things. And will try to optimise better.

    About pre-render blast. Surprisingly it works well with blasts, even with lots of sprites. FPS drops are only on continiusely spawned fire sprites.

    And once again. Really thank for all replies=)

  • Thanks everyone, I will continue my little tests with such things. And will try to optimise better.

    About pre-render blast. Surprisingly it works well with blasts, even with lots of sprites. FPS drops are only on continiusely spawned fire sprites.

    And once again. Really thanks for all replies=)

  • If you're fading out and then destroying the flame effect sprites, try recycling them instead.

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