0 votes

I need your help fixing some weird framedrops / stutter / jitter I have on my Godot 3.2 project.
https://github.com/Skipperro/trainz/tree/testing
It's a simple 3D game I've started to create recently - It's currently just a train running on simple, straight track, through a town and a forest.

The game is so simple it doesn't even use 1% of my CPU (Ryzen 7 3800X) and about 10% of my GPU (Titan Xp). Even though it's nothing that could stress the PC I see weird stuttering or framedrops while the train is in motion. If you look at the environment you will see that the movement is not nice and smooth and sometimes there is a brief freeze, just like few frames would be completely skipped.

Profiler won't help me - it says that frametime is consistent and way below 16 ms. Even if I see framedrops, profiler keeps reporting perfect performance.

If you would have time to help me, please download my project and try it yourself. To move the train you have to slowly rise the throttle by dragging the lever on the right of using arrow keys.

asked May 16 in Engine by Skipperro (118 points)
edited May 17 by Skipperro

Add details about the OS and drivers you are using, also the monitor refresh rate.

If on windows (which has known problems with OpenGL) you can try enabling the option of vsync via compositor on Display>window settings and see if changes something.

I'm on Linux Mint 19.3 with NVIDIA driver 440.64.
I'm having a 144 Hz display running in Free-Sync. No issues with other games.
I've experimented with vsync settings, fullscreen, forcing FPS, Jitter-Fix settings ect. Nothing works :(

Out of desperation I took this project:
https://github.com/godotengine/godot-demo-projects/tree/3.2-57baf0a/loading/threads

and simply added this function:

func _process(delta):
var rot = $Sprite.rotation_degrees
rot += delta*360
if rot > 360:
    rot -=360
$Sprite.rotation_degrees = rot

It simply rotates the image, so I can see some action.
The movement is broken the same way as in my project - little shaky and once per about 15 seconds it freezes for a moment.
Anyone encountered this behavior before?
Could it be my system?
If yes - how can I fix it?

1 Answer

0 votes
Best answer

OK, I found the solution.

It was nothing with the Godot or my project.
If you are having similar issue on Linux with NVIDIA - reinstall the NVIDIA driver.

I've purged everything NVIDIA related, restarted PC, installed same driver version, restarted again and now every Godot project is running smooth as butter.

answered May 17 by Skipperro (118 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.