Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse lags because commands are too frequent #54

Open
danuker opened this issue Nov 30, 2020 · 3 comments
Open

Mouse lags because commands are too frequent #54

danuker opened this issue Nov 30, 2020 · 3 comments

Comments

@danuker
Copy link

danuker commented Nov 30, 2020

I find that mouse moves and scrolling is much too fast to be useful. There are too many events per second, even lagging the cursor sometimes (network issues? xdotool execution delay on server?). I do not need that high a temporal resolution.

I believe it is somewhere related to this function:

public void OnXMouseMoved(float dx, float dy,boolean scroll) {

I would like OnXMouseMove triggered much less often (such as less than 10x per second).

@cobixewe
Copy link
Contributor

I believe it is actually based on the minimal movement in pixels on the Android side; so if it would be made configurable and you set it higher, thre would be less traffic.

@danuker
Copy link
Author

danuker commented Feb 25, 2021

That could also be useful, but I still think doing this is the way to go:

  1. accumulating the dx and dy into their sums,
  2. calling OnXMouseMoved regularly with the sums,
  3. then resetting the sums to 0

If you implement throttling using minimal movement, a fast-enough mouse move would still clog up the system/network.

@danuker
Copy link
Author

danuker commented May 6, 2021

I saw this game on Hacker News:

https://mysteries.wizardzines.com/50ms-request.html

Perhaps it is relevant to XMouse :)

Spoiler (don't click if you want to play the game).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants