Latency of Input Events?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
quark
Prole
Posts: 3
Joined: Sun Aug 08, 2010 5:16 pm

Latency of Input Events?

Post by quark »

I am experiencing high latency of input events.

I use 'print' to print mouse position / key pressed events, love usually print the current events 1 second later (no matter where I moniter these events: draw(), update(), mousepressed(), etc.

Latency can also be sensed using samples from wiki.

Is there anybody experiencing same problem as me ?

Additional information:
I am using a dual-core Intel x86 laptop running Archlinux i686 and installed love from AUR (version 0.6.2)
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Latency of Input Events?

Post by kikito »

I'm not experiencing anything like that.

Can you put a code sample?
When I write def I mean function.
quark
Prole
Posts: 3
Joined: Sun Aug 08, 2010 5:16 pm

Re: Latency of Input Events?

Post by quark »

kikito wrote:I'm not experiencing anything like that.

Can you put a code sample?
For example,

Code: Select all

function love.draw()
	local mx, my = love.mouse.getPosition()
	 love.graphics.print(mx..' '..my, 200, 200)
end
If I move mouse from (x0, y0) to (x1, y1) and stop there, love will display two changing numbers and finally stop at (x1, y1).
The problem is the latency: the time love display (x1, y1) is about 1 second after mouse stopping at (x1, y1) :o:
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: Latency of Input Events?

Post by kikito »

But is that your complete main.lua file, or are you doing something else (i.e. in love.update)
When I write def I mean function.
quark
Prole
Posts: 3
Joined: Sun Aug 08, 2010 5:16 pm

Re: Latency of Input Events?

Post by quark »

kikito wrote:But is that your complete main.lua file, or are you doing something else (i.e. in love.update)
that is a complete main.lua ....

I found that love-hg is faster. Maybe my hardware is somehow slow, but love uses < 10% CPU, it is strange ...
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Latency of Input Events?

Post by bartbes »

That is very strange, I have never seen love do anything like it, you could try the usual stuff, update drivers. Another thing that might be interesting, could you test whether this lag also exists in other SDL programs/games (because love uses SDL for input/events)?
User avatar
Tesselode
Party member
Posts: 555
Joined: Fri Jul 23, 2010 7:55 pm

Re: Latency of Input Events?

Post by Tesselode »

I noticed at least one laptop also lags really bad with Love. Bad enough that the physics glitch up.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Latency of Input Events?

Post by bartbes »

But that seems like a mere lack of processing power, input latency is weird.
pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: Latency of Input Events?

Post by pekka »

I've tried Löve on a computer with no hardware OpenGL and a non-fancy processor. The particle demos ran at something like 5 frames per sec, and the Lovalanche demo had the balls tunnel thru each other & other weirdness. It was too slow for most things, but the input handling was never anywhere near that slow.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Latency of Input Events?

Post by Robin »

I don't even have this shit on my crappy laptop.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests