Why CPU is loaded on 100%?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By xevin
:warning: Old Version Published before Godot 3 was released.

autotranslated:
I created the game “Guess two identical elements.”
When the game starts, CPU is loaded at 100%, even though the game logic has not yet started and the screen displays only the main menu (assembled from standard UI elements)

rus:
Я создал игру “отгадай два одинаковых элемента”.
При запуске игры, CPU нагружается под 100%, хотя игровая логика ещё не запустилась и на экране отображается только главное меню (собранный из стандартных UI элементов)

Screenshot: https://drive.google.com/open?id=0B9B9F2yBkwWLaWszdFN1dUtOTWs

Please, write it in English, even if you use automatic translation tools (you can keep the Russian version for reference though)

Bojidar Marinov | 2016-05-11 10:19

@xevin: You can use tools like https://translate.google.com to get a loose English translation of what you want to type and then ask that here.

So you’re asking:

I created the game "Guess two identical elements." When the game starts, CPU is loaded at 100%, even though the game logic has not yet started and the screen displays only the main menu (assembled from standard UI elements)

Which version of Godot are you using?

codevanya | 2016-05-11 11:12

I use latest version from Steam - Godot 2.0.2.stable.official on Ubuntu 16.04 x64

xevin | 2016-05-11 11:19

Does your system freeze after this?

codevanya | 2016-05-11 11:57

no freezings. Game works fine. But one core of CPU load to 100% and cpu-fan make noise.

xevin | 2016-05-11 12:06

:bust_in_silhouette: Reply From: xevin

OK. I experimenting with Project settings and set target_fps=24 resolve my problem

24 fps is good for movies but video games need a bit more, to be comfortable to the eyes.
You can try to increase the fps a bit, to 30 fps for instance.

DriNeo | 2016-05-11 15:25

Ok, thanks. But my game no have any animations or effects, just GUI

xevin | 2016-05-11 18:03

:bust_in_silhouette: Reply From: ericdl

A similar issue was addressed in this Reddit thread, where a user heard his computer fan whine after pressing play in Godot. The solution was to enable v-sync in the computer’s graphics control panel. Setting target_fps in Godot will work as well but will force your users to play at a locked FPS.

And that’s how Arkham Knight was born :stuck_out_tongue:

vinod | 2016-05-12 02:47

:bust_in_silhouette: Reply From: Khairul

There is a method to limit cpu usage, OS.set_low_processor_usage_mode(true).