SOLVED Real FPS is high but game is lagging?

Kreastricon

Member
Good evening everyone,

I happened to stumble across a very annoying problem when I was test running a game today I have been making for eight years, Super Witch Girl, with Game Maker Studio 1.49999

The game is NOT running at a speed that it normally should. It is very laggy, and everything is running half the speed it used to. However, when I fun the code show debug overlay, it shows that it is running really fast, sometimes over a 1000 fps.

But here's the interesting thing, the bug is not just limited to this one project. It has effected EVERY game that I made with GMS 1.4! These are finished products, that I published online for redistribution after thorough testing. They are not performance heavy games, yet for whatever reason, they are running really slow on my computer all of a sudden. (Just one game made with GMS2 wasn't affected.)

I have a strong suspicion that it is some other program on my computer that is to blame because I have been through this before. A long time ago my game Super Witch Girl ran slow during testing because my stupid computer was syncing files with Onedrive constantly, so when I disabled it, everything ran smooth. The problem though is that I have no idea what program is slowing me down or why it is happening now.

Then it occurred to me that I just updated Windows not too long ago, so it made me wonder if I am the only one having this issue. I did try looking at the Task Manager but there's just so many small programs running that it's kind of difficult to narrow it down.

Is there anyone out there that experienced a lag issue with Game Maker Studio 1.4 and figured out how to fix it? What was the culprit, did you make a workaround? Please help me.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Since you said that it's running at "half the speed"... did you by any chance install a graphics card driver update recently (or maybe it was installed alongside other updates via Windows Update)?

What you're describing sounds a lot like what happens when you have Vsync globally enabled, which locks the frame rate of anything to the monitor's refresh rate. If it can't run smoothly at that refresh rate, it'll lower the frame rate again in certain increments, a common one being half of the target frame rate. What exactly qualifies as "unable to run at the target frame rate" depends heavily on the exact implementation, but something as simple as a bit of loading time when the game starts (and thus a lower FPS during the loading time) may be enough to trip it.
 

renex

Member
welcome to windows 10, where things that have been working fine for 20 years suddenly don't.

 

Kreastricon

Member
Since you said that it's running at "half the speed"... did you by any chance install a graphics card driver update recently (or maybe it was installed alongside other updates via Windows Update)?

What you're describing sounds a lot like what happens when you have V-sync globally enabled, which locks the frame rate of anything to the monitor's refresh rate. If it can't run smoothly at that refresh rate, it'll lower the frame rate again in certain increments, a common one being half of the target frame rate. What exactly qualifies as "unable to run at the target frame rate" depends heavily on the exact implementation, but something as simple as a bit of loading time when the game starts (and thus a lower FPS during the loading time) may be enough to trip it.
I am not sure what happened during the windows update, I just do it when the computer suggests it prior to shutdown. I updated my Nvidia drivers yesterday to see if the problem would fix itself but it didn't happen.

I don't think it is the V-sync option, I actually have the option to switch it off and on during gameplay but it just didn't seem to make a difference.
 

O.Stogden

Member
I am not sure what happened during the windows update, I just do it when the computer suggests it prior to shutdown. I updated my Nvidia drivers yesterday to see if the problem would fix itself but it didn't happen.

I don't think it is the V-sync option, I actually have the option to switch it off and on during gameplay but it just didn't seem to make a difference.
I think Tsuka might have been suggesting you check the Nvidia Control Panel. Nvidia can over-ride any options you choose in game, if the control panel is set to do so, so having an option in your game won't make a difference in that case.

This does sound like a V-sync issue though. If your game is set to run at 60FPS, and it's running at a straight 30FPS (or locking at any FPS below 60) with little to no deviation, that's almost certainly V-sync related.

As Tsuka said, if your monitor isn't 60hz or 120hz, and is instead something like 72hz or 144hz, you might run into issues with this, as it often slows down to a factor of that number (so 72hz might slow your game to 36FPS).

I run a 60Hz display and haven't had this problem, although I know some people playing my game on high Hz monitors do have this issue.
 

Kreastricon

Member
welcome to windows 10, where things that have been working fine for 20 years suddenly don't.

I'm confused, I have no idea how those things work. I put them in the same folder as Game Maker and nothing happens. I put them in the same folder as a compiled game and nothing happens. Am I missing something?
 

Kreastricon

Member
I think Tsuka might have been suggesting you check the Nvidia Control Panel. Nvidia can over-ride any options you choose in game, if the control panel is set to do so, so having an option in your game won't make a difference in that case.

This does sound like a V-sync issue though. If your game is set to run at 60FPS, and it's running at a straight 30FPS (or locking at any FPS below 60) with little to no deviation, that's almost certainly V-sync related.

As Tsuka said, if your monitor isn't 60hz or 120hz, and is instead something like 72hz or 144hz, you might run into issues with this, as it often slows down to a factor of that number (so 72hz might slow your game to 36FPS).

I run a 60Hz display and haven't had this problem, although I know some people playing my game on high Hz monitors do have this issue.
Thank you O.Stodgen for clarifying!

I fixed it.

I also have 60Hz monitor and the game was running 60 room speed, but it didn't run smooth.

I changed the vertical sync to "fast" in the Nvidia control panel and I noticed an immediate improvement!
Solved!.png

Thank you all so much for helping!

Check out my game Super Witch Girl on Itch if you ever get a chance.
 
Top