Game lags in editor when unfocused

Background:
I am making a multiplayer game (using the library ENet).
Therefore, i need to open multiple game windows at the same time in order to test the networking stuff. So i launch the UnrealEngine.exe twice and open the project on both windows.

Now the important part:
When i run the game in the editor of the first window, it works fine. But as soon as i tab out of that window (making it unfocused), the framerate drops to like 1-5 fps even in the “F1-Mode”, where no surfaces are rendered. When i then launch the game in the second window, this second game runs totally smooth as it’s focused, while the other one is very laggy. When i then tab into the first window again, it runs smooth again and the second window starts lagging. This makes it really unpleasant to test the game.
When i instead launch a standalone window and tab out of it, the game goes on totally fine with no fps drop, so i suppose my computer is not the problem (but there actually is the fps drop when i then focus the editor instead of the desktop or browser).
So a fix might be to just launch two standalone games, but the problem is that i don’t know how to launch them in windowed mode and right now in fullscreen i can’t move them so the don’t overlap.

So my questions are:
Is there a fix to the lag when you unfocus the running game in the editor?
If not, is there a way to run the game in standalone mode windowed instead of fullscreen?
Or is there another way to launch two game instances at once?

1 Like

Hello Batrox,

Does disabling Editor Preferences → ‘Use Less CPU when in Background’ improve your situation?

Cheers

5 Likes

thank you Astrotronic. I had the same prob. It solved it. :+1:

1 Like

For me the soultion was to set Fixed Frame Rate in settings.