Input lag

For questions about using Classic.

Post » Mon Dec 07, 2009 5:08 pm

The mouse behavior does not use timedelta. It's almost identical to using an always - set position to mousex, mousey event.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Mon Dec 07, 2009 5:12 pm

[quote="newt":2btv1eex]Have you tried [u:2btv1eex]not[/u:2btv1eex] using timedelta?
Something like:
Always
>sprite set position to mousex, mousey

I think there will always be some issues using the mouse behavior, especially since the actual cursor is not confined to timedelta. On the other hand your going to get some "skipping" if you dont use timedelta, especially with a sprite so big.[/quote:2btv1eex]

removed behavior, added your event, lag's the same.

also, made a 10x10 sprite, no change.
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Dec 07, 2009 5:48 pm

Out of curiosity - would it be possible to make the mouse behavior grab the current mouse position rather than use the one in the event sheet that's being processed (which lags behind a bit)?
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Dec 07, 2009 7:46 pm

I don't know if this is an issue with the v-sync. If it is just a visual thing wouldn't other input lag just as much as the mouse? The mouse location lags very noticeably even with the windows cursor turned off.
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon Dec 07, 2009 8:05 pm

[quote="Kadoba":3sj9qqw9]I don't know if this is an issue with the v-sync. If it is just a visual thing wouldn't other input lag just as much as the mouse? The mouse location lags very noticeably even with the windows cursor turned off.[/quote:3sj9qqw9]


[quote="In my very first post, I":3sj9qqw9]....... The same with keyboard controlled behaviors. Help, pretty please, anyone?[/quote:3sj9qqw9]
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Dec 07, 2009 8:08 pm

[quote="ranma":1sg1y5yr][quote="Lost my Keys":1sg1y5yr][quote="ranma":1sg1y5yr]Well, recently I noticed a HUGE input lag. When you create a sprite (say 128x128 red square) and give it a mouse behavior it will always follow the mouse, but with some kind of lag. The same with keyboard controlled behaviors. Help, pretty please, anyone?[/quote:1sg1y5yr]

Switch framerate mode to unlimited, just to see if it still lags.[/quote:1sg1y5yr]

nope, in unlimited mode it does not lag. but I don't think it a good solution :/

edit: in vsync it runs on 60fps (lcd screen), my specs: athlon 64 x2 2,9ghz, 2gb ram, nv geforce 9600gt so I don't think it's a hardware related problem :([/quote:1sg1y5yr]

Nope it's not a solution and wasn't meant to be, but it narrows down the problem.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Dec 07, 2009 8:08 pm

This does look like a system issue rather than a construct issue to me. I fiddled around with the mouse speed and precision settings in my control panel and they both affect how much a box with Mouse Behavior lags behind it (and yes, mine lags as well, but not nearly as bad as in the video that was posted). I would guess that the amount of lags varies from system to system. Hell, what kind of mouse you have might even have an effect on the matter.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Dec 07, 2009 8:28 pm

[quote="deadeye":hj5mjkdh]This does look like a system issue rather than a construct issue to me. I fiddled around with the mouse speed and precision settings in my control panel and they both affect how much a box with Mouse Behavior lags behind it (and yes, mine lags as well, but not nearly as bad as in the video that was posted). I would guess that the amount of lags varies from system to system. Hell, what kind of mouse you have might even have an effect on the matter.[/quote:hj5mjkdh]

when i use a graphic tablet (wacom), this also happens. also I tested it on two other computers (both laptops) - and on one the lag was somewhat the same, on the other, it was quite small!

i think it has something to do with the graphic card, the computer with the smallest lag is actually worst of all three, but it has an ati card, other two computers have nvidia. any ideas?
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Dec 07, 2009 8:48 pm

Might have to do with double or triple buffering.

At least triple buffering causes horrible lag in 3D games, most console ports suffer from this as mouse lag is much more noticeable than button lag.

To wit: Dead Space.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon Dec 07, 2009 10:16 pm

I'm not sure why this happens. I guess it would be useful to narrow it down to a single setting.

I can't see how Construct could cause more than two or three frames latency given double buffering, which should appear almost instant. It might be something to do with graphics cards settings, VSync, mouse settings, or a combination. I don't know of anything I could do to rectify this at all; as far as my code does, it gets the mouse position and draws it, all in the same frame, so I can't see where such a large delay would come from!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests