250 Sprites + Animation = 12 FPS Drop

0 favourites
  • 10 posts
From the Asset Store
Set of 12 Parallax Background to make pixel art game.
  • I want to start this off on a good note and say I'm constantly impressed by C2's ability to get things done compared to, say, MMF2, even if I'm complaining below.

    I don't have a very good video card (ATI Radeon 5450) but I don't think 250 sprites being animated on screen at once should drop my FPS by 12 even with my video card being mediocre. Yes, I constantly update my video card to the latest drivers hoping and praying the FPS will be 60 in the game I'm working on but my hopes are always dashed. I know it's the animation doing this because I have stopped it before and my framerate jumps back up drastically.

  • corlenbelspar :

    could we have more details about this?

    (Resolution of the sprites, number of frames, speed of the animations, are all these sprite the same or are they different sprites?, does they have effects or behaviors to them?)

    I think 250 sprites on screen are quite a lot, but to some extend, I can imagine contexts where this can be needed for decoration.

    If all animations are not needed, you can try to do a compatibility mode to ensure best performances can be obtained at the cost of less animated stuffs(It is a suggestion though).

  • What is size of your sprite?

  • Is it the same across all browsers? Which browsers have you tried?

    It may be that your graphics card is known to have security/stability issues, and has reverted to software rendering, so it's not even using the graphics card. In Chrome you can go to chrome://gpu to check what the status of hardware acceleration is.

    Also, if you are making a minimal test project, note that if nothing moves or changes then the screen is not redrawn. So you will artificially get 60 FPS because it's not actually rendering anything. As soon as things start moving/changing, it will be rendering the screen and you'll get a real framerate measurement.

    If you share your .capx we can take a look and try it on our own systems. On a high end desktop it should be possible to get thousands of objects on-screen at once.

  • The resolution if 854x480, sprites are 32x32 with 4 frames and an animation for each direction they move, which is the standard four directional. They have some effects and behaviors but these are usually disabled most of the time.

    We're using Node-webkit. Firefox usually runs much slower for me so I try to avoid using it. I thought it was my video card but I checked in the game and in that site you linked to Ashley and it said I was running under hardware acceleration.

    The moving of the sprites themselves doesn't effect my framerate, it's just when they're animated that things take a turn for the worst.

    I will make a demo CAPX and see if I can replicate the issue for my computer here in a bit. I have to leave right now so it might be a few hours.

    Thanks for inquiry into my issue. :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm... I'm trying to recreate the issue in a blank CAPX but even when I generate 250 enemies multiple times that all move and are animated, the framerate mostly stays at 60 except where it drops to around 44 for a few moments seemingly at random.

    Oh well, here's the CAPX of what I'm doing in the blank one.

    https://www.dropbox.com/s/rkj55zeidn6dwrf/enemyconundrum.capx

  • I don't see any problem (expect mobiles)

    online demo

    I change some things in your capx and now it work with 60 stable FPS on Chrome and FireFox even with 1001 objects. (On my old mobile device 12fps with 250 objects)

    Don't forget about optimization. See at project settings - Clear background , Pixel Rounding , etc.

    The capx

  • here no problem too i' made some change to see object count ect..

    more than 4000 sprite on chrome/firefox/opera (webgl) at 60fps

    more than 8000 sprite on nodewebkit (webgl) at 60fps

    if you target computer nodewebkit is awesome :)

  • I seem to recall if your card is blacklisted, chrome lists it's using hardware acceleration even if it's actually using swiftshader (because swiftshader is emulating hardware acceleration). Try running chrome with the blacklist disabled, if the performance improves, you know it was using it. That's the only way I know of to get chrome to reveal if it's actually using swiftshader or not.

  • I can't test the actual game in a browser because it uses Node-webkit functions essential to the game's runtime. Is there any way to set this option for Node-webkit if it even exists for it?

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