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

Forum Home Forum Home > Construct 2 General > Construct 2 general
 Post Reply Post Reply Page  12>
Author
5,705 Rep
Post Options Post Options   Quote cesisco Quote  Post ReplyReply Direct Link To This Post Topic: Set position to(Mouse.X,Mouse.Y)Chrome performance
    Posted: 23 Feb 2012 at 4:04pm
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

capx

Edited by cesisco - 23 Feb 2012 at 4:06pm
Back to Top
3,354 Rep
Post Options Post Options   Quote cjr1974 Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 2012 at 4:35pm
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.
lilplayground24-7.com COMING SOON to a park near you!!
Back to Top
5,705 Rep
Post Options Post Options   Quote cesisco Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 2012 at 5:17pm
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?

Edited by cesisco - 23 Feb 2012 at 5:20pm
Back to Top
19,243 Rep
Post Options Post Options   Quote sqiddster Quote  Post ReplyReply Direct Link To This Post Posted: 23 Feb 2012 at 9:28pm
It almost looks like it's setting the position the next tick...
Back to Top

Moderator
29,650 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 24 Feb 2012 at 2:01pm
Originally posted by cesisco cesisco wrote:

Thanks,i'm using R74(wainting for a a more stable version


@Cecisco: the very latest version (r79.4) is the latest stable version.
You really should update to it.
Back to Top
5,705 Rep
Post Options Post Options   Quote cesisco Quote  Post ReplyReply Direct Link To This Post Posted: 24 Feb 2012 at 5:03pm
@Kyatric ok i'll try the latest version but i'm seeing a lot of bugs reported in the forum.tks
Back to Top

Scirra Developer
84,445 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 24 Feb 2012 at 6:36pm
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.
Back to Top
5,705 Rep
Post Options Post Options   Quote cesisco Quote  Post ReplyReply Direct Link To This Post Posted: 24 Feb 2012 at 6:53pm
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.
Back to Top
4,893 Rep
Post Options Post Options   Quote TL22 Quote  Post ReplyReply Direct Link To This Post Posted: 25 Feb 2012 at 3:51am
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).
Back to Top
5,705 Rep
Post Options Post Options   Quote cesisco Quote  Post ReplyReply Direct Link To This Post Posted: 25 Feb 2012 at 6:45pm
Originally posted by TL22 TL22 wrote:

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).


@TL22 sorry, but i don't get it, could you explain me this.Thanks.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down