• Godot Help
  • Simple scene drops FPS to 58/59 and it shows a lot [3.5.1 stable / GLESS 3]

Erich_L I don't have another one at home.

I'll try to tell a friend to try, to see what the results are.

It is very strange, I have come to think that it may be my PC, but then it would not make sense that if I export it to Android it would have the same behavior and it would continue to stutter, right?

🙁

    dandorf It is very strange, I have come to think that it may be my PC, but then it would not make sense that if I export it to Android it would have the same behavior and it would continue to stutter, right?

    For instance if the stutter is caused by another process running periodically and consuming many resources in an already resource-restrained environment, like a weak computer, or a mobile device. That's my opinion of what's happening.

    Can you list your full PC specs? I see your CPU listed, are you using the integrated GPU? What operating system? Everything updated with the OS and all drivers?

    PC Specifications:

    Graphic card:

    How can I tell if Godot is using the dedicated graphics card and not the integrated one? do you use it by default?

    That computer is not the newest, but I used to have a similar machine with a 750 Ti and it could run AAA 3D games at 1080P. It should have no problem with that simple 2D scene in Godot.

    Maybe it is using integrated graphics, that is one possibility. Some laptops (or all in one systems) can use switchable graphics, that switches between the dGPU and iGPU, and honestly it never worked.

    Or it could be a software issue, such as anti-virus running on the system, or some other background process (cloud backup, etc.). Not sure.

    dandorf

    It doesn't jerk like your video showed on either of my devices, but I've got different hardware and software. It might slow down a little on my phone, but it's so gentle that I could be imagining it.

    I have had the opportunity to test it on a laptop (with worse features than my computer) and the game is more stable, it does not have those annoying stutters!

    Sometimes it lowers the FPS but I think it's normal, because the laptop is not very powerful, but it does eliminate those stutters! That's fine.

    So it can be deduced that my PC has some incompatibility with Godot... Since running the game in Godot on my PC with both integrated and dedicated graphics, it stutters.

    It still surprises me that if I export the game from my PC to Android and try it on my mobile, it has the same stutters as it does on my PC.

    If I export to Android from a PC will the game work fine and not have stutters, on Android then will it work fine? I don't understand this, I thought that would depend on the mobile in question!!

    You are helping me a lot, thank you very much

    3 months later

    I come back to the subject...

    I bought a new computer, with a RTX 3070 Ti graphics card and I tried to replicate the same game in Godot and surprise...

    It keeps doing the stutters every "x" seconds.... The stuttering happens just when it drops from 60 to 59 FPS, at that moment.

    I still don't understand why this happens. I think it's the movement of the Camara2D but I have no idea how to fix this. 🙁

    If I leave static, even if the game drops to 59 no stuttering is noticed.... But if the Camara2D is constantly moving, chasing the player, there if you notice a stuttering when it goes down to 59 FPS, especially in the environment (the map tiles).

    It's probably worth considering that not all stuttering or jittering is caused by lag. Potential causes are myriad. Yes it could be to do with physics but perhaps the source is just collision, some micro-collision happening every n-frames or so.

    I bet it's CPU related. On thing can be a garbage collector or memory management. For example, if you had a particle system and every 10 seconds it runs out of memory, the reallocation could cause a frame rate hitch.

      and what tests could I do to try to detect the error? 🙁

      Best thing to do is to provide a ZIP of a project so that others can test it.

      It would probably show up as a thin vertical line when profiling the app. That said, I only have a rudimentary understanding of the profiler. But that is where to look.

      cybereality
      do you mean this?

      I used the profilaldor and I get that vertical line...

      That chart is a frame-time plot. That is a graph of time each frame took to be displayed on screen. I phrased it that way for a reason. You might think it's how long it took to render, but no. It's how long everything took to get ready and then on top of that to be rendered.

      Where that 1 spike is is whats causing the average FPS value to momentarily show slightly under 60 fps, but for that specific spike, for that 1 frame or rather because of it the average effectively might have actually been '15 fps'.

      So the next question is to figure out what is actually happening during that 1 frame, during the spike.

        Megalomaniak
        What surprises me is that the game is super simple.

        I don't quite know how to debug it to find out where it might be causing the problem.

        EDIT: Also, I just checked that the vertical line does not appear whenever I launch the game....
        Sometimes it doesn't appear, and the game has the same jitters as always every "x" seconds.

        I am very confused!