Strange Fps drops when spawning objects

1 favourites
  • 10 posts
From the Asset Store
320 high-quality cinematic sound effects for trailers and game scenes.
  • Ok i hope i can explain this properly so... huge text incoming!

    Recently i encountered a strange bug where after spawning lots of objects for a while the game starts to have increasingly bad fps drops when spawning objects. I noticed this when i was working on my Touhou project style bullet hell game where tons of objects are spawned all the time (specially enemy bullets) and used to work perfectly fine with no fps drops or anything like that. But recently i ran on this issue where after around 40s in my game, the game started to have some bad fps drops when spawning bullets and was running at less than 45 FPS while doing so, which was not good for my game because i set the minimum frame rate at 60 FPS due to bullet patterns breaking at less than 60-55 FPS (like not spawning enough bullets) so it makes the game run very slow. So i began to use the debugger to find anything that could be causing this but found nothing.

    I though that this had something to do with UIDs because after a while the bullets UIDs where becoming large like ranging above 10,000 and maybe the game was having trouble managing stuff or something:

    I filed a bug report but it turned out this was not a bug and UIDs have always worked like these: github.com/Scirra/Construct-3-bugs/issues/5910

    which is pretty funny because I've been using construct 2/3 for like 2+ years and never noticed this :v

    So before filing another bug report i decided to check for other bullet hell projects i made in the past and it happened in them too!! and these projects weren't modified until now so it was very strange. So to check this didn't had anything to do with my code, i opened the GLOKAR game template and made the boss shoot bullets every 0.1 seconds in all of its attacks and sure enough it was starting to drop FPS when spawning bullets.

    So i concluded this happens when spawning frequently any object after a while, but before filing another bug report i wanted to know if any body was a having a similar problem, maybe this is a issue with my pc or my browser and not construct 3. I am not very sure in which release this started to happen but it was probably on r302

    Thank you for reading all of this and i hope anybody can help me!

    Edit: here is a gameplay of my game so you can see FPS drops: youtube.com/watch The drops become noticeable on 0:50 This also happens to me in exported projects btw-

    Tagged:

  • Really hard to tell from the little information.

    Having lots of objects, especially if they run complex logic, for example collision checks, for each loops etc will be very costly to performance if not optimized thoroughly.

    Are you sure the performance problem is not based on the sheer amount of bullets and events?

    As you say the problem is recent, does the project run better in a old version of c3?

    Secondly could you send a simple project file that has the problem so I can investigate?

  • https://drive.google.com/file/d/1JMx4M9_82Eirxq5rIfF-H2cQCyZ4Urmi/view?usp=sharing

    I created this setup and let it run for a few minutes, for me performance stays consistent and doesn't get worse over time.

  • Really hard to tell from the little information.

    Having lots of objects, especially if they run complex logic, for example collision checks, for each loops etc will be very costly to performance if not optimized thoroughly.

    Are you sure the performance problem is not based on the sheer amount of bullets and events?

    As you say the problem is recent, does the project run better in a old version of c3?

    Secondly could you send a simple project file that has the problem so I can investigate?

    I am sure its not because of the amount of bullets simply because it worked fine before, even in very old projects. ill be working on a file to send. How can i try an older version of construct 3 btw

  • > Really hard to tell from the little information.

    > Having lots of objects, especially if they run complex logic, for example collision checks, for each loops etc will be very costly to performance if not optimized thoroughly.

    > Are you sure the performance problem is not based on the sheer amount of bullets and events?

    >

    > As you say the problem is recent, does the project run better in a old version of c3?

    >

    > Secondly could you send a simple project file that has the problem so I can investigate?

    I am sure its not because of the amount of bullets simply because it worked fine before, even in very old projects. ill be working on a file to send. How can i try an older version of construct 3 btw

    Open: editor.construct.net/r281

    for example

  • Really hard to tell from the little information.

    Having lots of objects, especially if they run complex logic, for example collision checks, for each loops etc will be very costly to performance if not optimized thoroughly.

    Are you sure the performance problem is not based on the sheer amount of bullets and events?

    As you say the problem is recent, does the project run better in a old version of c3?

    Secondly could you send a simple project file that has the problem so I can investigate?

    Hello and sorry for responding late. I just made this bullet hell engine on release 293.3 which works the same as the engine i use for my current game but a bit incomplete. I tested in both r293 and r302 and the fps drops never happened in r293 despite using the same project file.

    drive.google.com/file/d/1T7rSCQ6Z-1zXiRebV4q2-ZXJhkNHWcTg/view

    fps on r293.3

    fps on r302

  • Starman

    hi!

    I followed you!

    please follow me!

    thanks!

  • yea if it is a performance regression with a new version definitely report it as a bug!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just for the record, it happened in my project too, in version r302 there is a big drop in fps, something that didn't happen before. I tested it on version r293.3 and it ran normal, 60 fps.

  • Just for the record, it happened in my project too, in version r302 there is a big drop in fps, something that didn't happen before. I tested it on version r293.3 and it ran normal, 60 fps.

    Glad i am not the only one! It turns out this happens because handling tweens is slower on r302 an onwards as Ashley says here: github.com/Scirra/Construct-3-bugs/issues/5916

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