luciusDXL / TheForceEngine

Modern "Jedi Engine" replacement supporting Dark Forces, mods, and in the future Outlaws.
https://TheForceEngine.github.io
GNU General Public License v2.0
979 stars 71 forks source link

High CPU Usage in Main Menu #155

Open codengine opened 1 year ago

codengine commented 1 year ago

I have a Ryzen 5950X CPU and noticed a very high CPU load while at the main menu. In my case one of the cores is at 100% load: grafik

During gameplay, the CPU load is "normal" at about 5% across all cores.

While working on the MIDI PR, I noticed that the routines that read and render the settings are called multiple times instead of just once, maybe this is the reason?

Thanks in advance.

TP555 commented 1 year ago

Hi

Do you mean the Agent Menu or the TFE Menu ? Take Screenshot for sure !

codengine commented 1 year ago

Hi

Do you mean the Agent Menu or the TFE Menu ? Take Screenshot for sure !

Main Menu, Settings, Manual, Credits etc. It does not happen in the Agent Selection. It also happens when you pause the game and open the configuration screen.

TP555 commented 1 year ago

@codengine

Try to Limit the FPS , with Msi Afterburner to safe 60FPS , you can check before the max. FPS ! But i think , with a Ryten 5950x you will generate a bunch of 1000FPS ;D

codengine commented 1 year ago

@codengine

Try to Limit the FPS , with Msi Afterburner to safe 60FPS , you can check before the max. FPS ! But i think , with a Ryten 5950x you will generate a bunch of 1000FPS ;D

The FPS is already limited to 80 FPS for Fullscreen and Background Applications.

TP555 commented 1 year ago

@codengine

ok , set to OpenGL for a Test and set 2160p in-Game ! May TFE have some problems to handle 32T , as Dual Core App. You can try to limit the Cores for TheForceEngine.exe to max 2 or 4 Cores in the Task Manager / Processor Affinity !

im get if Software or OpenGL around 27-30% CPU Usage i7 3770 @3,70ghz AC !

luciusDXL commented 1 year ago

The issue you are seeing is that the Menus are rendered in software even if the main game is set to GPU Rendering. There is future work on add GPU acceleration to Landru, the 2D system used for cutscenes and menus.