0 votes

Hello, while using the engine for a 3D spaceship game, it happens sometime (i'm still not sure how to reproduce the issue, for now it seems random) that the game start stuttering (sometimes even freeze).
I notice that, when this happens, the GPU utilization is almost 0%, while it is normally around 10%.
While in this state, if I throttle up the spaceship (which cause more calculation both for new forces applied and orbital calculation) the GPU kicks in again (25% utilization) and the game fps goes up to 75 as usual.
This is very weird, i suppose somehow the engine fails at calling the GPU in, and the CPU has to compensate (failing).
Has this ever happened to you? Is there a way to directly control GPU/CPU usage?

asked May 21 in Engine by Andrea (486 points)
edited May 21 by Andrea

Has this ever happened to you? Is there a way to directly control GPU/CPU usage?

No, you need to profile your code and see what's taking the most time. Note that physics servers are not included in the profiler view (this is a known issue).

You can use microbenchmarking facilities like OS.get_ticks_usec() in your code to perform manual profiling too.

thanks for making me discover the profiler!! I wasnt aware this tool existed and was immediatly able to discover a couple of issues

Too bad i stepped in the physics server not included :( i have huge peaks of idle times and no idea were do they come from

Please log in or register to answer this question.

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.