• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows FPS drop when going to window mode or pressing windows key

thom

Member
Hi,

I want to update my game, the last update was in April 2020 and everything worked fine.
For the new update I will use the exact same version of the game, but using the latest GMS:2 release, IDE 2.3.1.542 Runtime 2.3.1.409.
The problem is when I want to record the screen with OBS Studio, I will have to press the windows key during the game to go to desktop start recording and come back to the game.
When I do that the FPS suddenly drops from 60 to 40, however when I press ALT+ENTER twice after that to go to windowed and back to fullscreen, FPS is suddenly back at 60 fps.
FPS drops also happens when recording in windowed mode. All of this didn't happen in the previous version of GMS:2 I used in April 2020.

Edit:

This seems to fix the FPS for fullscreen when returning to focus. However in window mode FPS is still low.

GML:
if !window_has_focus()
{
window_focus=0
}
if window_focus=0
{
if window_has_focus()
{
window_focus=1   
if window_get_fullscreen()=true   
{
window_set_fullscreen(false)
window_set_fullscreen(true)
}
}
}
 
Last edited:

O.Stogden

Member
It might be because of Windows changing how it handles refresh rates.

Is your monitor over 60hz? Running a GMS game locked to 60FPS on a monitor over 60hz makes the game run at a lower FPS than 60, due to the changes in Windows.

GMS 2.3.2 fixes this, but it's still in beta right now, should be out this month I'd say though.

I have the same problem with TRF, a player has a 144hz monitor, and because of that, the game runs at 40-50FPS for him.

Nice game by the way, if it's Ultimate Racing 2D you make. I have it on my phone, and almost bought it on Switch when it was 70% off, but I barely use my Switch so I added it to wishlist and forgot about it. šŸ˜…
 
Last edited:

thom

Member
I use 60hz monitor all though I have heard some players may have some trouble with 144hz, so it would be great to have that fixed in the next GMS update. However I tried to install GMS2 beta but it didn't work, I got the message "Unable to access vital system files" when launching beta, so I will have to wait until it releases on stable version.

Thank you, yes it's Ultimate Racing 2D. I have your game The Race Factory on wishlist as well looks great, will try it out soon.
 
Top