[SOLVED] Tween performance

0 favourites
  • 11 posts
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
  • Hello!

    I've seen old posts about this issue, and I believe it was improved, however I'm seeing my performance going up real quick when tweening. I attached a video. Basically all the characters are replicas made of several sprites that load a config from a Json. When I have the tweens off, performance is good. When I turn it on it goes up so quick... This is an exploration, so the full game has a lot of other stuff going on, that summed to this may be very problematic. I was trying to go for timelines to see if the performance was better (also I have more visual control) but I couldn't make them work in the replicas...

    Subscribe to Construct videos now

    Any ideas on what to try?

  • I think this is tricking you as Construct doesn't draw when nothing is moving but instead keeps showing the front buffer instead.

    So in that case the cpu draw calls and gpu usages goes down to basically 0. So I think it's not due to the tweens themselves but instead because the tween causes a new frame to be drawn ~220 times a second as now the screen is changing every tick.

    Try adding a simple rotating box to make sure the screen is still redrawn every tick in the tween off benchmark.

  • I think this is tricking you as Construct doesn't draw when nothing is moving but instead keeps showing the front buffer instead.

    So in that case the cpu draw calls and gpu usages goes down to basically 0. So I think it's not due to the tweens themselves but instead because the tween causes a new frame to be drawn ~220 times a second as now the screen is changing every tick.

    Try adding a simple rotating box to make sure the screen is still redrawn every tick in the tween off benchmark.

    Yep, you are completely right, I did the test with a rotating cube + characters without tween and I obtained the same performance... Is there any way to make it better?

  • One thing I'd note, is, you have a 240hz monitor, and get around 70% gpu usage. Can assume if you divide by 4, that would be a more common result (so around 17% gpu usage for 60hz monitors).

    Maybe performance is fine but is struggling to render so quickly!

    To lower gpu usage overall, be mindful of any effects you use. You could also make a "quality" system by using System>Set Canvas Size, where you'd get a blurred result but allows people with weak GPU's or high refresh rates to be able to get a more stable FPS.

    Your cpu seems pretty good for 240hz.

    I'd recommend switching your refresh rate to 60hz to observe performance, so you have good idea of what most people would experience.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One thing I'd note, is, you have a 240hz monitor, and get around 70% gpu usage. Can assume if you divide by 4, that would be a more common result (so around 17% gpu usage for 60hz monitors).

    Maybe performance is fine but is struggling to render so quickly!

    To lower gpu usage overall, be mindful of any effects you use. You could also make a "quality" system by using System>Set Canvas Size, where you'd get a blurred result but allows people with weak GPU's or high refresh rates to be able to get a more stable FPS.

    Your cpu seems pretty good for 240hz.

    I'd recommend switching your refresh rate to 60hz to observe performance, so you have good idea of what most people would experience.

    Thank you for those insights! My games are exclusive to android devices, is it still work to switch to 60hz and observe performance?

  • Thank you for those insights! My games are exclusive to android devices, is it still work to switch to 60hz and observe performance?

    You should definitely try your game with different monitor refresh rates, I do this regularly to make sure I didn't forget to use delta-time or something like that.

    But the performance on mobile is vastly different. The game that works perfectly on PC may lag pretty bad even on a high-spec mobile phone. So I suggest you test it on different mobiles.

  • > Thank you for those insights! My games are exclusive to android devices, is it still work to switch to 60hz and observe performance?

    You should definitely try your game with different monitor refresh rates, I do this regularly to make sure I didn't forget to use delta-time or something like that.

    But the performance on mobile is vastly different. The game that works perfectly on PC may lag pretty bad even on a high-spec mobile phone. So I suggest you test it on different mobiles.

    I'll try! Thank you very much! I have another game shipped and it works more or less okay!

  • Can you share your example project?

    Maybe there are some performance improvements that can be done on Construct's side.

  • Can you share your example project?

    Maybe there are some performance improvements that can be done on Construct's side.

    Yes! Is it okay if I share it privately by DM?

  • Yeah sure, you can send it to diegohqc@scirra.com

  • Yeah sure, you can send it to diegocqo@scirra.com

    Mail sent ^^ Thank you!

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