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 visible in browser #158

Open
tobiasvl opened this issue Nov 1, 2021 · 4 comments
Open

Gamepad visible in browser #158

tobiasvl opened this issue Nov 1, 2021 · 4 comments
Labels

Comments

@tobiasvl
Copy link
Contributor

tobiasvl commented Nov 1, 2021

When exporting an Octo game to HTML and choosing the "Gamepad" option as the game's touch mode, the gamepad overlay seems to be visible (but unresponsive) in the desktop browser version, even though the gamepad is only supported on touch devices.

@pushfoo
Copy link
Contributor

pushfoo commented Nov 4, 2021

Would making it capable of responding when on desktop be useful? I can see it as useful for turn-based strategy games.

@tobiasvl
Copy link
Contributor Author

tobiasvl commented Nov 4, 2021

Perhaps, but IMO it's a little awkward to have the gamepad cover the screen when you're on a computer where there's much more screen real estate than on a cell phone.

Personally, to achieve almost the same thing without an overlay, I'd rather draw the buttons myself in the corners, using the Seg16 touch mode to make the buttons respond to mouse clicks.

@JohnEarnest JohnEarnest added the bug label Aug 3, 2022
@pushfoo
Copy link
Contributor

pushfoo commented Nov 3, 2023

even though the gamepad is only supported on touch devices.

It should be possible to make it work on desktop since the browser gamepad API has been supported fairly universally since 2012.

@JohnEarnest
Copy link
Owner

I experimented briefly with the gamepad API a few years ago, and found that Safari, Firefox, and Chrome all had seriously inconsistent behavior and completely failed to detect most of the gamepads I had on hand. I'm open to the idea of gamepad support if somebody else wants to do the work and prepare a PR, but I absolutely do not want to add support if it will only work correctly on Chrome.

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

No branches or pull requests

3 participants