Page 1 of 2

lag spikes

Posted: Wed Dec 15, 2010 7:51 pm
by saiko-chriskun
has anyone else experienced any lag spikes? about every second the time of one frame will jump slightly.. it's not that big a deal but it looks bad and was just wondering =/

Re: lag spikes

Posted: Wed Dec 15, 2010 8:14 pm
by ghostwriter
Are you accessing the hard drive at any point in your main loop? If you load a new image or sound you may experience a slight delay.

Re: lag spikes

Posted: Wed Dec 15, 2010 8:42 pm
by saiko-chriskun
no, it even happens when I load the FPS demo, which only prints the current value for dt.

Re: lag spikes

Posted: Thu Dec 16, 2010 12:48 am
by ghostwriter
Hmm... you might have other applications running that are slowing things down. Do you notice this lag in other 3d applications? I had the same thing happen to me a couple years ago, it turned out to be due to the bandwidth monitor I had running in the background, because it was continuously updating its log files. I've noticed that some IRC clients can do this as well.

Re: lag spikes

Posted: Fri Dec 17, 2010 10:10 am
by adrix89
Its a vsync problem
A way to fix this is to either set it to fullscreen(witch means you have to do some hacking for most games) or set vsync to false(which I don't recommend,besides most don't use dt)
Old thread:
http://love2d.org/forums/viewtopic.php?f=4&t=2003

Re: lag spikes

Posted: Fri Dec 17, 2010 6:16 pm
by TechnoCat
adrix89 wrote:most don't use dt
This isn't true.
My graphics drivers force v-sync off and I don't have a problem with most games.

Re: lag spikes

Posted: Sat Dec 18, 2010 8:53 am
by thitem
Try set high priority for game application through the task manager.

Re: lag spikes

Posted: Sat Dec 18, 2010 10:25 am
by Xkeeper
thitem wrote:Try set high priority for game application through the task manager.
This is not only a really really bad idea, but it won't fix it, either.

It's a vsync issue. Just disable vsync and apply some common sense dt checks and you're good.

Re: lag spikes

Posted: Sat Dec 18, 2010 11:00 am
by bartbes
How would vsync cause this?

Re: lag spikes

Posted: Sat Dec 18, 2010 11:23 am
by thitem
I have this problem too. And high priority fix it.
Maybe lag spikes have a another reason.