The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

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?

in Engine by (1,514 points)
edited by

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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.