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
36
S
11
G
9
Posts: 394
Reputation: 10,269

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
27
S
6
G
7
Posts: 67
Reputation: 5,109

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
36
S
11
G
9
Posts: 394
Reputation: 10,269

Post » Thu Feb 23, 2012 9:28 pm

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

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
263
S
93
G
56
Posts: 7,181
Reputation: 67,656

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
36
S
11
G
9
Posts: 394
Reputation: 10,269

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
373
S
218
G
84
Posts: 23,525
Reputation: 186,342

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
36
S
11
G
9
Posts: 394
Reputation: 10,269

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
78
S
29
G
8
Posts: 307
Reputation: 10,285

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
36
S
11
G
9
Posts: 394
Reputation: 10,269

Next

Return to Construct 2 General

Who is online

Users browsing this forum: frcol and 5 guests