Why BGE use lot of CPU when running game in idling state?


(blenderaptor) #1

Press P, my game is in idling state. Nothing is running. No always sensors, No pulse modes, so why the heck my game makes my CPU climb to 20% ?

Its super annoying


(TheDave) #2

It’s not really idle. Every ‘frame’, the game engine goes through a loop which involves detecting inputs, python, rendering, etc, and that happens even if you are not shuffling things around on the screen. The fact that nothing is going on just means the engine can go through its frames faster. Normally you WANT it to have the highest FPS possible, which means using a lot of your available resources to do it.

As you add more into your simulation, you should notice your frame rate decreasing, rather than more of your computers resources being used. That of course entirely depends on what you’re doing as some things will use more CPU,GPU, I/O, etc, but generally speaking should be true.


(wkk.py) #3

If you use UPBGE the issue should be less extreme: UPBGE will process everything it needs to do for each frame (usually 60 frames / second), and then sleep until the next frame.

Thanks to that sleep your CPU is not at 100%.