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

gamepad plugin has a noticible input delay #7921

Closed
F3der1co opened this issue Mar 23, 2024 · 1 comment
Closed

gamepad plugin has a noticible input delay #7921

F3der1co opened this issue Mar 23, 2024 · 1 comment
Assignees
Milestone

Comments

@F3der1co
Copy link

F3der1co commented Mar 23, 2024

Problem description

The gamepad plugin introduces a rather large input delay. In main.js I implemented the gamepadAPI to compare.

Attach a .c3p

gamepadTest.zip

Steps to reproduce

  1. run preview
  2. open console
  3. press A on the gamepad

Observed result

there is an input delay caused by the gamepad plugin, in the console you can visually see the logging of the gamepad plugin lagging behind, additionally you can see a different time is logged

Expected result

The gamepad plugin is as fast as the gamepadAPI

More details

Affected browsers/platforms:

First affected release:

System details

View details

PASTE HERE

@AshleyScirra AshleyScirra self-assigned this Mar 25, 2024
@AshleyScirra AshleyScirra added this to the Next beta milestone Mar 25, 2024
@AshleyScirra
Copy link
Member

On my system it only measures a 2ms difference in timing - much less than a single frame at 60 FPS (~16ms). However I think the design of the input handling may have added an extra frame of latency. I've adjusted the design and increased the polling rate for the next beta which should mean that gamepad input is processed as soon as possible.

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

No branches or pull requests

2 participants