• 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 Games runs slow after windows update on both GMS 1.4 and GMS 2

Hello!

So I've been working on a game for about 5 years in Game maker Studio 1.4 (I use Game Maker Studio 2 as well).
The game has never had any lag or frame-drops. The overall performance for the game have always been working great.

Until this morning.

Apparently windows decided to update my computer during the night and now game runs slow in both
Game Maker Studio 1.4 and Game Maker Studio 2 along with some of my other projects.

The roomspeed is 40 in all rooms. I get around 1000-2000 fps when drawing 'fps_real', but around 30 fps when drawing 'fps'.
Strange thing is... if I change the FPS to 60. It works fine? As in the FPS stays at 60 without going down...

Not sure what to make of this? Why is my game all of a sudden lagging on my computer? Is it the update?

I really need help with this, because it makes no sense to me.
 

kburkhart84

Firehammer Games
Something may have changed in your video drivers with the windows updates. That said, you should likely change to either 30 or 60FPS for a room speed, as that is what matches vsync. Speaking of vsync, maybe what changed is the video driver overriding your vsync settings(if they didn't change). This makes the most sense to me considering you change your room speed to 60 and it works fine.

In general, if vsync is turned on(whether it is in GMS or the video setting overriding it), if you aren't making the 60 FPS, it will cut it down to 30FPS(basic explanation). So even though the real FPS is in the thousands, the drawing event is happening at 40FPS and that is how the video driver sees it either way, and so it would be cutting it down to 30 since it isn't making 60.

Of course, having vsync turned off can cause issues as well depending on your system and if the frames sync up or not.

In either case, I seriously recommend changing your room speed to 60 and not looking back. I know GMS has always had the room speed option in order to just set movement speed and not worry about delta timing things....but I've never figured out why someone would want room speed other than 60 except for platforms that maybe can't keep up or are limited in some fashion(HTML5, mobile).
 
Something may have changed in your video drivers with the windows updates. That said, you should likely change to either 30 or 60FPS for a room speed, as that is what matches vsync. Speaking of vsync, maybe what changed is the video driver overriding your vsync settings(if they didn't change). This makes the most sense to me considering you change your room speed to 60 and it works fine.

In general, if vsync is turned on(whether it is in GMS or the video setting overriding it), if you aren't making the 60 FPS, it will cut it down to 30FPS(basic explanation). So even though the real FPS is in the thousands, the drawing event is happening at 40FPS and that is how the video driver sees it either way, and so it would be cutting it down to 30 since it isn't making 60.

Of course, having vsync turned off can cause issues as well depending on your system and if the frames sync up or not.

In either case, I seriously recommend changing your room speed to 60 and not looking back. I know GMS has always had the room speed option in order to just set movement speed and not worry about delta timing things....but I've never figured out why someone would want room speed other than 60 except for platforms that maybe can't keep up or are limited in some fashion(HTML5, mobile).
I was worried you were gonna say that. Like I mentioned, 5 years in the making. Changing everything to match a room speed of 60 will take A LOT of work. But you're saying this is the only option?

I downgraded the update of windows, just to make sure it wasn't the game itself. Once I went back to the previous version of windows, everything started working like normal again.
 

O.Stogden

Member
Make sure you are using the latest video drivers, particularly if you use Nvidia.

Older Nvidia drivers have issues with Version 2004 of Windows 10, so you should double-check you are on the latest drivers.

Also as Kburkhart said, always best to build the game at the highest FPS you want the game to run at, which is usually 60 (Might become higher soon). Useful to keep in mind for future projects.
 

O.Stogden

Member
I think as your framerate is 40FPS, that's a very odd framerate.

Computers and monitors are designed to display at 30, 50, 60, 75, 90, 120, 144 FPS usually (all Android/iOS devices for example, tend to display at 60FPS). So having 40 will cause issues with anyone using V-sync. Your PC is likely enforcing v-sync, either through the Nvidia/AMD control panel, or the option in Game Maker itself, or Windows may have changed how it handles V-sync in programs, and that's messing up your game as 40 is not a standard for FPS.

EDIT: Implementing some sort of delta time, or perhaps increasing your roomspeeds up to 60 and then dividing the necessary variables (such as speed, counters/alarms) by 1.5 to match up the 40 with the 60FPS might be your best option here.
 
I think as your framerate is 40FPS, that's a very odd framerate.

Computers and monitors are designed to display at 30, 50, 60, 75, 90, 120, 144 FPS usually (all Android/iOS devices for example, tend to display at 60FPS). So having 40 will cause issues with anyone using V-sync. Your PC is likely enforcing v-sync, either through the Nvidia/AMD control panel, or the option in Game Maker itself, or Windows may have changed how it handles V-sync in programs, and that's messing up your game as 40 is not a standard for FPS.

EDIT: Implementing some sort of delta time, or perhaps increasing your roomspeeds up to 60 and then dividing the necessary variables (such as speed, counters/alarms) by 1.5 to match up the 40 with the 60FPS might be your best option here.
I was worries that increasing the room speed was the best option... It's not hard to do - but it will take a whole lot of time.
 

kburkhart84

Firehammer Games
I was worries that increasing the room speed was the best option... It's not hard to do - but it will take a whole lot of time.
I think it is still your best option. This is one of those times where you may learn the hard way that it should have been set to 60 from the start. I have to admit I'm curious though...where did you get the idea that 40 was a good number to use for that? I've never seen it in a tutorial or given as advice anywhere(I'm genuinely curious).
 
I think it is still your best option. This is one of those times where you may learn the hard way that it should have been set to 60 from the start. I have to admit I'm curious though...where did you get the idea that 40 was a good number to use for that? I've never seen it in a tutorial or given as advice anywhere(I'm genuinely curious).
Yeah, I guess you're right. I've actually already started :) Thanks so much for the help, really appreciate it!

As for why I decided on 40 FPS... I have no earthly idea haha. I think I just threw variables in there and then changed the roomspeed to fit them instead of the other way around.
I didn't think it mattered that much at the time. Note to self, never do that again!
 
Yeah, I guess you're right. I've actually already started :) Thanks so much for the help, really appreciate it!

As for why I decided on 40 FPS... I have no earthly idea haha. I think I just threw variables in there and then changed the roomspeed to fit them instead of the other way around.
I didn't think it mattered that much at the time. Note to self, never do that again!
Hi, I encountered exactly the same problem yesterday, thank GOD I found a relevant post from someone - the day before my GMS1.4. games ran just fine, yesterday I did the update, and suddenly after that all of my games run slower than normal. My problem is that since I didn't know what to do, I deleted the Windows.old file (the old version) which took a ton of space, since I figured maybe that is causing it all. Then I made a restore point to the day before but didn't help either, well, should've seen it coming...
All I could do was disable 'Game Mode' on Windows, known to cause issues, but to no avail.
My current version is Windows 10 2004.
Is there any ways to fix it for all games, the sudden lag? Or do I indeed have to manually scour through my games and raise the FPS? (It's 30 now but I'd raise it to probably 50, since 60 would make them too fast already, considering all the timed things in my games)

or should I wait for a Windows update to fix this ?
 
Last edited:
Hi, I encountered exactly the same problem yesterday, thank GOD I found a relevant post from someone - the day before my GMS1.4. games ran just fine, yesterday I did the update, and suddenly after that all of my games run slower than normal. My problem is that since I didn't know what to do, I deleted the Windows.old file (the old version) which took a ton of space, since I figured maybe that is causing it all. Then I made a restore point to the day before but didn't help either, well, should've seen it coming...
All I could do was disable 'Game Mode' on Windows, known to cause issues, but to no avail.
My current version is Windows 10 2004.
Is there any ways to fix it for all games, the sudden lag? Or do I indeed have to manually scour through my games and raise the FPS? (It's 30 now but I'd raise it to probably 50, since 60 would make them too fast already, considering all the timed things in my games)

or should I wait for a Windows update to fix this ?
Thing is. GMS 1.4 didn't work that well on the new windows update at all, only GMS2. So you might want to upgrade to GMS2?
I'm going to raise the game FPS to 60 but that means also changing the in-game values in the game for acceleration, speed, alarms and animations to match the new FPS

You can read more in my other post about how to do that: https://forum.yoyogames.com/index.p...-keeping-the-in-game-speed.79338/#post-471585
 
Thing is. GMS 1.4 didn't work that well on the new windows update at all, only GMS2. So you might want to upgrade to GMS2?
I'm going to raise the game FPS to 60 but that means also changing the in-game values in the game for acceleration, speed, alarms and animations to match the new FPS

You can read more in my other post about how to do that: https://forum.yoyogames.com/index.p...-keeping-the-in-game-speed.79338/#post-471585
thanks for reply. So, the windows update is clearly the reason for the giant slow-down in all my games? And the best fix is to upgrade the GMS? Does ugprading GMS1.4 to .2 actually fix the slow-down issue, and maintain the same speed as all the executables had before this Windows update?
I always intended to finish my games on GMS1.4. and only then upgrade to 2, because I was (still am) afraid of the trouble that importing will bring, and all the new events in GMS2, and the old ones going obsolete and having to be replaced...
Its been 3 years since I switched from Gm8.1 to GMS1.4 and the trouble of importing and replacing obsolete functions was tedious as all hell 😁
but if that's the only way, well, maybe I should.
I read the post about 'delta timing', seems like a handy thing, but I have to take more time to get into it. So it's meant to ease the process of manually changing all the speed values in the games, right?
Is it better to start doing that to all my games, or upgrade to GMS2 right away? Basically: which one is less trouble? 😁 (my autumn schedule has been very busy with studies and work so I'd prefer the easiest approach...)
 
Last edited:

kburkhart84

Firehammer Games
thanks for reply. So, the windows update is clearly the reason for the giant slow-down in all my games? And the best fix is to upgrade the GMS? Does ugprading GMS1.4 to .2 actually fix the slow-down issue, and maintain the same speed as all the executables had before this Windows update?
I always intended to finish my games on GMS1.4. and only then upgrade to 2, because I was (still am) afraid of the trouble that importing will bring, and all the new events in GMS2, and the old ones going obsolete and having to be replaced...
Its been 3 years since I switched from Gm8.1 to GMS1.4 and the trouble of importing and replacing obsolete functions was tedious as all hell 😁
but if that's the only way, well, maybe I should.
I read the post about 'delta timing', seems like a handy thing, but I have to take more time to get into it. So it's meant to ease the process of manually changing all the speed values in the games, right?
Is it better to start doing that to all my games, or upgrade to GMS2 right away? Basically: which one is less trouble? 😁 (my autumn schedule has been very busy with studies and work so I'd prefer the easiest approach...)
Generally it is recommended that you hold up on upgrading to GMS2 if you have a big project in GMS1...that said, you are a few years behind. The recommendation to wait is based on that you wouldn't start new projects in GMS1 after GMS2 is out, which either is not what you did, or this project is literally taking years to finish.

My personal recommendation...I'd say upgrade to GMS2, at the least try it. You will for sure need it for the next project if you haven't already bought it so it is likely worth it. However, you should probably use 2.2.5 instead of 2.3, atleast for the initial conversion. Then you should make sure it all works, and if you feel like, switch to 2.3. 2.3 is called a stable release, but many people have had some problems with it, however 2.2.5 is pretty solid.

I remember a few years ago when I went from GMS1 to GMS2...I didn't wait...I didn't have a big project or anything, rather it was about updating some code and an asset I have made(which happens to be under re-write for 2.3). It generates some compatibility functions if you are using things that changed between the versions, like the views to the new camera system, and for the most part that change is pretty solid. You could easily leave those changes alone and keep working your project like that. It is better to eventually get rid of those functions and learn the new way, but to finish out a project there is nothing wrong with the compatibility functions.

***************************************

About fixing timing, etc... delta time is a thing that I would not recommend you worry about. It isn't so much that you have to make so many changes to your code, rather that it can bring some other issues(like objects jumping around if the FPS gets really low, instead of just slowing things down). So it really is better to not use it unless you really need it for something. It is much better to set the room speed to 60 and just be sure to make your game run fast enough to keep up to 60FPS. 60 is generally the best number except for some platforms which may work better with 30FPS. And note that if VSync is enabled, your FPS needs to be at 60 or 30 because you will get issues there as well with slowdown(say if you had room speed of 40). And also with VSync, if you are using 60 FPS and the game gets slower, it will instantly run it 30FPS to sync with the next lower speed of monitor refresh. So if you DO want to fix your timing issues(regardless of whether you upgrade to GMS2 or not), I highly recommend setting room speed to 60 and then fixing your objects' speed/acceleration/friction from there.
 

Murzy

Member
We also ran into this issue after the Windows 10 2004 update.

We solved it by increasing the "sleep margin" setting in the game settings to something that is greater than the frame time you are having.

For example, for game targetting 60fps, use a value greater than 1/60 => 16.666ms, e.g. 20ms, and the problems should go away.

This will increase the CPU usage of your game, but it is the better option, than to have a laggy game.
 
Generally it is recommended that you hold up on upgrading to GMS2 if you have a big project in GMS1...that said, you are a few years behind. The recommendation to wait is based on that you wouldn't start new projects in GMS1 after GMS2 is out, which either is not what you did, or this project is literally taking years to finish.

My personal recommendation...I'd say upgrade to GMS2, at the least try it. You will for sure need it for the next project if you haven't already bought it so it is likely worth it. However, you should probably use 2.2.5 instead of 2.3, atleast for the initial conversion. Then you should make sure it all works, and if you feel like, switch to 2.3. 2.3 is called a stable release, but many people have had some problems with it, however 2.2.5 is pretty solid.

I remember a few years ago when I went from GMS1 to GMS2...I didn't wait...I didn't have a big project or anything, rather it was about updating some code and an asset I have made(which happens to be under re-write for 2.3). It generates some compatibility functions if you are using things that changed between the versions, like the views to the new camera system, and for the most part that change is pretty solid. You could easily leave those changes alone and keep working your project like that. It is better to eventually get rid of those functions and learn the new way, but to finish out a project there is nothing wrong with the compatibility functions.

***************************************

About fixing timing, etc... delta time is a thing that I would not recommend you worry about. It isn't so much that you have to make so many changes to your code, rather that it can bring some other issues(like objects jumping around if the FPS gets really low, instead of just slowing things down). So it really is better to not use it unless you really need it for something. It is much better to set the room speed to 60 and just be sure to make your game run fast enough to keep up to 60FPS. 60 is generally the best number except for some platforms which may work better with 30FPS. And note that if VSync is enabled, your FPS needs to be at 60 or 30 because you will get issues there as well with slowdown(say if you had room speed of 40). And also with VSync, if you are using 60 FPS and the game gets slower, it will instantly run it 30FPS to sync with the next lower speed of monitor refresh. So if you DO want to fix your timing issues(regardless of whether you upgrade to GMS2 or not), I highly recommend setting room speed to 60 and then fixing your objects' speed/acceleration/friction from there.
thanks for reply. time to get to work then.
Sure thing, I think I'll upgrade to GMS2 sooner or later. but yes, I've been working alone on a couple of projects and had various on and off-seasons with them, so they have already taken a couple to a few years.
So if my room speed is 30 in my projects currently, it would be best set to 60 to get the same results as they used to perform before this whole incident?

We also ran into this issue after the Windows 10 2004 update.

We solved it by increasing the "sleep margin" setting in the game settings to something that is greater than the frame time you are having.

For example, for game targetting 60fps, use a value greater than 1/60 => 16.666ms, e.g. 20ms, and the problems should go away.

This will increase the CPU usage of your game, but it is the better option, than to have a laggy game.
Thanks for reply. From what I've read on another post elsewhere, Windows changed it’s multitasking scheme, so it was indeed a Windows 10 update that caused this..
Excuse my ignorance but I've never dealt with 'sleep margin' before. So if room speed is set to 30 in pretty much all my projects, what should I set the sleep margin to, to achieve the same speed as my games used to run with before?
 

kburkhart84

Firehammer Games
thanks for reply. time to get to work then.
Sure thing, I think I'll upgrade to GMS2 sooner or later. but yes, I've been working alone on a couple of projects and had various on and off-seasons with them, so they have already taken a couple to a few years.
So if my room speed is 30 in my projects currently, it would be best set to 60 to get the same results as they used to perform before this whole incident?
I generally recommend 60 on PC as opposed to 30 just to have a smoother frame rate, at 30 sometimes things can look choppy when something moves too fast(not due to performance). So you would still have to change your code to use the new speeds to get the previous behavior.

However, if you update to GMS2, and it no longer has this issue, then maybe you can skip that for now and just finish this project. I don't know if that's the case.
 

Murzy

Member
Excuse my ignorance but I've never dealt with 'sleep margin' before. So if room speed is set to 30 in pretty much all my projects, what should I set the sleep margin to, to achieve the same speed as my games used to run with before?
The sleep margin is not very well documented function of GMS, but as I've understood it, it is the time between the frames while the engine does more accurate "busy waiting". If the time between the gamesteps of your game, and the time it takes to process them is larger than the 'sleep margin', then the GMS engine uses a different, more inaccurate way of waiting between the frames, which may – and apparently after this Windows update – will lead to choppiness.

To answer to your question: use a value that is higher than 1/30 => 33.333ms, for example: 34ms or a higher nice round number like 40.

To my understanding there is no other downside to setting this to a longer value, than increased CPU usage, which is to be expected when gaming. I'm not sure if even a huge number that ensures that the more inaccurate timing between steps never occurs, something like 'sleep margin' = 9999, would cause issues. However, I'm not 100% sure how this is implemented in the engine...

...
However, if you update to GMS2, and it no longer has this issue, then maybe you can skip that for now and just finish this project. I don't know if that's the case.
I believe this issue also exists in the latest version of GMS2.
 
The sleep margin is not very well documented function of GMS, but as I've understood it, it is the time between the frames while the engine does more accurate "busy waiting". If the time between the gamesteps of your game, and the time it takes to process them is larger than the 'sleep margin', then the GMS engine uses a different, more inaccurate way of waiting between the frames, which may – and apparently after this Windows update – will lead to choppiness.

To answer to your question: use a value that is higher than 1/30 => 33.333ms, for example: 34ms or a higher nice round number like 40.

To my understanding there is no other downside to setting this to a longer value, than increased CPU usage, which is to be expected when gaming. I'm not sure if even a huge number that ensures that the more inaccurate timing between steps never occurs, something like 'sleep margin' = 9999, would cause issues. However, I'm not 100% sure how this is implemented in the engine...



I believe this issue also exists in the latest version of GMS2.
thanks, clarified this a bit for me. So I'll try and change the Sleep margin (increase it to 40, for instance). In my settings it's now set as 1 ms as default.
If I continue my projects with the new Sleep margin set, and it turns out good (games go back to same speed as they used to be pre-update) do other computers experience the executables as I do, or do my games end up running at hyper-speed on them?
 
thank you all! After I have time to get back to my project and try out the Sleep margin I'll be all the wiser.
so just to clarify. as @kburkhart84 replied earlier in this thread,
So if you DO want to fix your timing issues(regardless of whether you upgrade to GMS2 or not), I highly recommend setting room speed to 60 and then fixing your objects' speed/acceleration/friction from there.
this can basically be achieved with tweaking the Sleep margin?
Otherwise it would be a lot of work? (at least with the amount of rooms and objects in my games, which are big)
 

Murzy

Member
So if you DO want to fix your timing issues(regardless of whether you upgrade to GMS2 or not), I highly recommend setting room speed to 60 and then fixing your objects' speed/acceleration/friction from there.
this can basically be achieved with tweaking the Sleep margin?
Otherwise it would be a lot of work? (at least with the amount of rooms and objects in my games, which are big)
Having your game run at non native speed to the display (like 40fps on 60hz screen) is a separate issue. 60 fps will look smoother on 60hz screen, 144fps will look smoother than 60 fps on 144hz screen, and so on. However, switching the game speed, ie. fps, is potentially a lot of work, if your game doesn't utilize delta timing.

However, I believe that the original issue in this topic was related to the GMS sleep margin "bug" where the performance on game speed 40 / 40fps, or whatever, was even worse than before, i.e. less than 40fps, after the Windows update, making the games look even choppier than they need to be.
 

kburkhart84

Firehammer Games
No, the sleep margin won't fix your game speed from 40FPS to 60FPS..that will require you to actually modify your objects, etc... which yes, is a lot of work. If you can somehow find a way to finish your game without doing it, it would be better, but I'm not sure how successful that will be, mainly because there are too many people that have VSync on and so your game would be stuck at 30FPS despite you setting speeds for 40FPS.
 
@Murzy @kburkhart84 so just tweaking the sleep margin won't return my games to their old speed, as in, put the music back in sync with cutscenes, etc.? Remove the slight lag that is now ever-present?
Im mostly curious if my fix, whatever that may be (sleep margin or otherwise) will now apply to all people who play my games on any computer; if I modify all the objects etc. up to speed they used to be pre-Windows update, will some computers experience my games running on a different speed entirely than other computers?
this whole issue came so suddenly that I'm kind of confused still, so excuse all my tons of questions. it's starting to clarify.

EDIT: I tried setting Sleep margin from 1 to 10 ms and...... whaddya know.... everything works.
No lag, the animations are in sync with sounds and music exactly like they used to be before.
Problem solved?
 
Last edited:
Thanks so much for this! I just got back into working on my game after a few months off, and was tearing my hair out as it was running sub-60 fps and choppy with screen flickering, and I obviously hadn't changed a thing coding-wise. Setting the sleep margin to 40 ms solved everything, it runs the same as before. Anyone know why this isn't considered a bug? The frustrating "bug"-like element to me seems to be that Gamemaker reports room speed and real fps as if they are running at their correct values, when the game itself is obviously chugging along at a different speed... shouldn't Gamemaker at the very least report the actual speed the game is running at?
 
Top