little lags

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
xefhs
Prole
Posts: 8
Joined: Fri Dec 09, 2011 7:17 am

little lags

Post by xefhs »

Hi guys,

In this attached .love, my image is supposed to move in x smoothly,
but sometimes (every ~10 secs) the movement is break and my image seems to be teleported. (just few pixels)

It run at 60 fps all the time, I have also tested with another PC. (I'm on love 0.7.2)

This is very annoying, because that break the game's fluidity. :(

If anyone knows what this is due (and tell me if you have the same problem please)...
Attachments
lags_test.love
(2.72 KiB) Downloaded 360 times
Sorry about my English, I'm French.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: little lags

Post by Jasoco »

There is absolutely nothing wrong with your code.

The problem lies with the computer. Windows, OS X or Linux? There is obviously something running in the background that gobbles up processor cycles causing this. It's not Löve. I'm 99.999999999999999% certain.
User avatar
xefhs
Prole
Posts: 8
Joined: Fri Dec 09, 2011 7:17 am

Re: little lags

Post by xefhs »

I've a PC run on Windows 7 x86, with the CPU usage at 1% when I do nothing, 15% when I run my .love (I have a 2 years old Notebook, Intel Core 2 Duo @ 2.00 GHz), I will try to update all my drivers but I have no hope. :cry:
Sorry about my English, I'm French.
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: little lags

Post by slime »

Does it happen when the game is full-screen?
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: little lags

Post by TechnoCat »

xefhs wrote:In this attached .love, my image is supposed to move in x smoothly,
but sometimes (every ~10 secs) the movement is break and my image seems to be teleported. (just few pixels).
You can always cap the maximum DT to prevent large teleports.
rvj
Prole
Posts: 15
Joined: Fri Feb 10, 2012 5:55 pm

Re: little lags

Post by rvj »

I get the exact same issue. I get it with my own game, but also with the love program without parameters (ie. it happens on all love programs).

I also get a max framerate of 60 FPS. It freezes for a few frames (half a second to a second probably), then continues.

Ubuntu 11.10 on a Gateway LT3201h netbook
AMD Athlon 2 Neo Processor K125, 3GB ram,
ATI Mobility Radeon HD 4225

I don't have the 'Additional Drivers' installed for the graphics card because it doesn't work great with this machine on ubuntu... for that reason I just ignored this issue on this computer.

I've tried VSync on and off, no changes.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: little lags

Post by utunnels »

It lagged for a few seconds when I started the demo, but became smooth later.
User avatar
Ellohir
Party member
Posts: 235
Joined: Sat Oct 22, 2011 11:12 pm

Re: little lags

Post by Ellohir »

Running smoothly at 61FPS with unnoticeable bumps to 59. Geforce 4 MX on windows.
User avatar
xefhs
Prole
Posts: 8
Joined: Fri Dec 09, 2011 7:17 am

Re: little lags

Post by xefhs »

I'm not alone :roll:
No seriously, I run it windowed with the default window size 800*600, and I have also these lags in all LÖVE programs.
I've updated my graphics card drivers but doesn't change anything.
It lagged for a few seconds when I started the demo, but became smooth later.
Me too and I think that is normal because LÖVE is getting ready, it doesn't matter for me.
Sorry about my English, I'm French.
User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: little lags

Post by miko »

Jasoco wrote:There is absolutely nothing wrong with your code.

The problem lies with the computer. Windows, OS X or Linux? There is obviously something running in the background that gobbles up processor cycles causing this. It's not Löve. I'm 99.999999999999999% certain.
I agree. It could be an antivirus, autoupdate, or anything running in the background, invisible to user. It could be also the graphics card (or its driver). I am attaching modified version, which shows current/max dt. I get dt=0.017, maxdt=0.14-0.20, FPS at 60, and all is smooth. So no problem for me.
Attachments
lags_test_dt.love
(2.83 KiB) Downloaded 365 times
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 14 guests