Set position to(Mouse.X,Mouse.Y)Chrome performance

Discussion and feedback on Construct 2

Post » Thu Feb 23, 2012 4:04 pm

Hi here's a capx with a simple event:

everytick-apple-set position to (Mouse.X, Mouse.Y)

In Firefox and IE it runs smoothly but in Chrome there is a little lag in the update of the position of the apple.I'm making a game and the controls are based on this.Can someone please check if this happens in your setup.Thanks.

setposition

capxcesisco2012-02-23 16:06:17
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Thu Feb 23, 2012 4:35 pm

It was lagging on my computer too..using chrome...seems like it should stay at the mouse.x and mouse.y position but it fell away from it more like it was following the mouse instead of snapping to it..if that makes sense.
B
26
S
6
G
7
Posts: 67
Reputation: 5,079

Post » Thu Feb 23, 2012 5:17 pm

Thanks,i'm using R74(wainting for a a more stable version) but if this happens with the capx file aswell, it has to be a chrome problem.Any suggestions?cesisco2012-02-23 17:20:03
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Thu Feb 23, 2012 9:28 pm

It almost looks like it's setting the position the next tick...
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Feb 24, 2012 2:01 pm

[QUOTE=cesisco] Thanks,i'm using R74(wainting for a a more stable version[/QUOTE]

@Cecisco: the very latest version (r79.4) is the latest stable version.
You really should update to it.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Feb 24, 2012 5:03 pm

@Kyatric ok i'll try the latest version but i'm seeing a lot of bugs reported in the forum.tks
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Fri Feb 24, 2012 6:36 pm

Some browsers use techniques like double-buffering that make the game run faster - but this imposes a one-frame delay, so things like this are always one frame behind. It's typical of practically any game engine as well.

You should not try and use sprites to replace the mouse cursor because of this problem. It can make input really laggy and frustrating. If you're just dragging around other objects, the delay shouldn't be a problem.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,498

Post » Fri Feb 24, 2012 6:53 pm

Thanks Ashley, i was only asking because it runs perfectly in firefox and IE.I'm not using this to replace mouse cursor, is more like to drag but i need a lot of accuracy to point to the wanted spot.I'll do this in a different way.Tks.
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Sat Feb 25, 2012 3:51 am

My game uses a sprite for a mouse cursor. What I do is I don't check for Mouse.X or Mouse.Y, but rather the mouse cursor sprite's X and Y. That way you don't get the appearance of that delay in positioning. It's still there obviously, but it doesn't matter. Works great for my game (which is a point and click adventure by the way).
B
56
S
20
G
7
Posts: 305
Reputation: 8,754

Post » Sat Feb 25, 2012 6:45 pm

[QUOTE=TL22] My game uses a sprite for a mouse cursor. What I do is I don't check for Mouse.X or Mouse.Y, but rather the mouse cursor sprite's X and Y. That way you don't get the appearance of that delay in positioning. It's still there obviously, but it doesn't matter. Works great for my game (which is a point and click adventure by the way).[/QUOTE]

@TL22 sorry, but i don't get it, could you explain me this.Thanks.
B
33
S
11
G
9
Posts: 381
Reputation: 10,153

Next

Return to Construct 2 General

Who is online

Users browsing this forum: glerikud and 8 guests