Input lag

For questions about using Classic.

Post » Sun Dec 06, 2009 7:49 pm

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?
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sun Dec 06, 2009 8:21 pm

Construct uses a double-buffered, V-synced display for optimal rendering quality - and this inevitably causes some lag. How bad is it, though? Usually it's fairly small.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Dec 06, 2009 8:27 pm

[quote="Ashley"]Construct uses a double-buffered, V-synced display for optimal rendering quality - and this inevitably causes some lag. How bad is it, though? Usually it's fairly small.[/quote]

well it's quite ugly, when using sprite as a cursor, its noticeable, ill try to create a movie to demonstrate this somehow, please wait... loading :)
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sun Dec 06, 2009 8:30 pm

You can always hide the Windows mouse cursor so you can't see the difference between that and the sprite cursor.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Sun Dec 06, 2009 8:34 pm

[quote="Ashley"]You can always hide the Windows mouse cursor so you can't see the difference between that and the sprite cursor.[/quote]

I know, but when I do that, it feels very strange when you move your mouse and wait few ms for the cursor to move :/
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sun Dec 06, 2009 9:02 pm

I uploaded a video here: viewtopic.php?f=16&t=5155
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Dec 07, 2009 8:19 am

That's quite a bit of lag.

Using the mouse behavior or a set position event gives me far less lag then that (and I'm on an old box).
B
1
G
3
Posts: 5
Reputation: 835

Post » Mon Dec 07, 2009 8:29 am

[quote="ranma":1l3vy6pa]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:1l3vy6pa]

Switch framerate mode to unlimited, just to see if it still lags.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Mon Dec 07, 2009 4:27 pm

[quote="Lost my Keys":1bv2dmpm][quote="ranma":1bv2dmpm]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:1bv2dmpm]

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

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 :(
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Mon Dec 07, 2009 4:38 pm

Have you tried [u:1nh1icj8]not[/u:1nh1icj8] 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.
Image Image
B
161
S
48
G
91
Posts: 7,357
Reputation: 67,269

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests