• 3D
  • What's the best way to track down a frame skip in the engine?

I've just been playing around in 3D in Godot 3.2, and I've noticed on my machine there is a noticeable frameskip every few seconds. I'm not doing anything complex with my code, just a simple player controller that can move and look around.

This is something unique to my machine, I played it on two other machines and don't notice the frame skip.

Here's an example of what's happening: https://gfycat.com/blueelegantgonolek At 2 seconds, and at 9 seconds, there's the frameskip.

I don't believe this is the renderer, I tried changing to GLES2, same thing. I downloaded and compiled the experimental Vulkan 4.0 branch, same frame skip. Likewise, it doesn't seem to be my scripting code either. I created my player controller in both C# and GDScript, no difference.

This doesn't happen in 2D, I got a semi-complex scene running in 2D and haven't noticed a single skip. This is 3D exclusive problem.

One thing odd to note, whenever the skip occurs, there's a delta time of exactly 0.001388889. Happens every time.

According to the profiler, the Idle Time and the Audio Driver both spike when there's a frame skip. I'm not sure what this tells me. Idle Time: Audio Driver:

The reason I ask here is because I have never delved into Godot's source code, I was hoping someone here could point me in the right direction so I'm not going in blind. If there's a better place to ask this let me know.

Let me know if you got an idea of what exactly my problem is. If you need more information, let me know.

My specs: Windows 10 Pro 64 bit Intel i7-4790K 32GB RAM Nvidia GTX 980 TI

Whats the difference between those other systems and your own?

All three are Windows 10. All three are Intel CPUs. One laptop was an integrated GPU, the other Nvidia GTX 1060. The problem computer uses High Definition Audio Device, my laptop Realtek High Definition Audio. A different motherboard and BIOS in each machine. Way too many program differences to list.

I'd be interested to know if you find a solution. I've noticed on my machine, I get some choppy camera movements, usually within the first few seconds of playing the scene. It's not a performance problem, I have a RTX 2080 Ti and a very good system for the simple scenes I'm testing. I haven't looked in the profiler but I wouldn't be surprised if it's the same issue.

Not sure if this would make a difference, but have you tried disabling V-Sync? Once I was working on a VR scene in Godot and noticed huge spikes in idle time, but disabling V-Sync seemed to fix the issue.

Disabled vsync in the project settings. There wouldn't be a hidden config file that defaults it on, would there? I've been there before.

@Lakiw said: Disabled vsync in the project settings. There wouldn't be a hidden config file that defaults it on, would there? I've been there before.

Not that I know of. Disabling it in the project settings seemed to turn it off for me. If the debugger shows the frame rate not locked to your monitor's refresh rate, then V-Sync should be off.

There wouldn't be a hidden config file that defaults it on, would there? I've been there before.

Disabling V-Sync hasn't been implemented in the master branch yet (which uses Vulkan), so beware. Also, some graphics drivers may be forcing V-Sync (this is common on Intel graphics). In this case, you'll have to open the graphics driver's control panel to allow applications to disable V-Sync.

I'm having this problem on 3.2 and 4.0, so the engine's vsync isn't the problem. I've done both enable and disable the vsync in my nvidia control panel, not the problem.