Jump to content


Photo

Periodic Framerate Drop


  • Please log in to reply
7 replies to this topic

#1 banov

banov

    GMC Member

  • GMC Member
  • 1160 posts
  • Version:Unknown

Posted 10 June 2012 - 05:01 AM

Hey. This question is sort of a weird one, and I wasn't sure where to place it. But I wanted to get word out.

I've noticed recently that when running GM games, periodically they take a brief hit to framerate and then bounce back to normal. Usually it slows about 20-30 fps for about 3 seconds and then resumes. This happens at regular intervals too, which is really weird. I only noticed it tonight on a large project I've been working on for a while, but a friend who'd been testing had mentioned an issue like this to me before several weeks/months ago. I spent some time debugging and trying to figure out which programming was the culprit, until I tried creating a new GM game with a blank room and found that the framerate was still doing the same thing.

More likely than not this is an issue that has to do with hardware, and it may even disappear when I next restart my computer. But it's still a bit disconcerting. I'm on a pretty new Lenovo Thinkpad running Windows 7, so it's not like there should be any strain there. I'm wondering if there's some sort of system setting that might be the cause? Does this problem exist for anybody but me and my friend?

EDIT: I should mention that this is specific to GM 8.1. I haven't tried this in other versions (yet?).

Edited by banov, 10 June 2012 - 05:04 AM.

  • 0

#2 TsukaYuriko

TsukaYuriko

    GMC Member

  • GMC Member
  • 510 posts
  • Version:GM:Studio

Posted 10 June 2012 - 05:28 AM

Sounds like the source isn't the game's coding, to say the least. Just an idea, but have you tried terminating absolutely all processes that aren't necessary for the system to run (or just booting into safe mode), then doing the test again and checking whether the frame rate still drops? Especially since you mentioned that the slowdown is periodic, the first thing that sparked my mind was an antivirus program doing scheduled "silent" scans in the background or similar things like updaters, sync programs... anything that "silently" runs in the background. Another possibility, although rather unlikely, a virus which only slows down the computer in certain intervals instead of all the time, like a standard slowdown virus probably would.

I don't know much about hardware, neither have I heard of a "Do not lag periodically" system setting. :)
My best guess remains software trying to silently run in the background.
  • 1

#3 NicroGames

NicroGames

    GMC Member

  • GMC Member
  • 296 posts
  • Version:GM:Studio

Posted 10 June 2012 - 12:12 PM

I think we may have the same computer, and I experienced something like this too in GM:Studio. It doesn't show a change in the fps variable though.
  • 0

#4 Creeper0110

Creeper0110

    GMC Member

  • GMC Member
  • 16 posts
  • Version:GM8.1

Posted 10 June 2012 - 08:40 PM

I have had this exact same problem for a while too. I worked around it by setting room speed to 9999 and only executing events 60 times per second. The fps intervals between the fps drops seem to scale with the room speed.
  • 0

#5 banov

banov

    GMC Member

  • GMC Member
  • 1160 posts
  • Version:Unknown

Posted 11 June 2012 - 02:21 AM

I have had this exact same problem for a while too. I worked around it by setting room speed to 9999 and only executing events 60 times per second. The fps intervals between the fps drops seem to scale with the room speed.

That seems kind of extreme and pretty unstable, doesn't it? I wouldn't like the idea of writing my own timer that functions inside of GM's existing timer; too much room for error.

I don't know much about hardware, neither have I heard of a "Do not lag periodically" system setting. :)
My best guess remains software trying to silently run in the background.

That sounds reasonable to me.

I suppose the most important thing to me is that the cause isn't something in Game Maker's engine/my programming, so I can feel comfortable shipping the game with this "issue" being known but unadressed in the game's programming.
  • 0

#6 Gamer3D

Gamer3D

    Human* me = this;

  • GMC Member
  • 1591 posts
  • Version:GM8.1

Posted 11 June 2012 - 07:33 AM

Could be framerate-limiting. (GM can reduce the number of steps to match the monitor refresh frequency)

If the code for your game (Including rendering) finishes just after a screen refresh, GM will wait for the next one. This can double the time taken for a step.

Note: GM doesn't necessarily start immediately after a screen refresh. Other processes may be run before the GM process. This will further delay the time when GM finishes running.
  • 0

#7 PoniesForPeace

PoniesForPeace

    puzzling

  • GMC Member
  • 493 posts
  • Version:GM:Studio

Posted 12 June 2012 - 10:22 PM

disconnect gamepad before gamestart
  • 0

#8 Mr.Kio

Mr.Kio

    GMC Member

  • GMC Member
  • 520 posts

Posted 29 June 2012 - 12:13 AM

Ive noticed the same problem on my new laptop. Periodically it just slows down for a couple of seconds. No change in the FPS variable. It's kind of distracting, and I've no idea why it does it.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users