-
Notifications
You must be signed in to change notification settings - Fork 55
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
Xbox One Controller support #74
Comments
I don't own any Bluetooth controllers, so I have no way of working on this. It's definitely something I'd be interested in adding though. |
If you have an Xbox 1 controller, you can plug it in btw |
I have nothing but PS2 and wireless Xbox 360 controllers. |
Yes, but then your code must be able to find a way of connecting to the controller, + on different operating systems it is different, and not all of us use windows (I don't, using Linux Ubuntu 20.04). |
It doesn't matter what operating system you use. That's the whole point of the web. I'm on Ubuntu 20.04 too. https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API has a tutorial. All I'd really need to do is map the controls and add a cursor for the menus, plus a few lines for connecting. But again, I have no way of testing, and trying to code without being able to run the code is futile lol |
if it connects to something like this then you can use it. but I don't know much about PlayStation or Xbox controllers (even though I have an Xbox controller (don't know if it's Xbox 1, just says "Xbox Wireless controller") that I bought mostly just for use with the Gamepad API) |
Well the PS2 was released in the year 2000, so it definitely isn't compatible with any computers. Xbox 360 was released in 2005, and their wireless controllers use a "proprietary 2.4 GHz protocol", meaning they won't connect directly to a computer. That's the same frequency as wifi, so it might theoretically be able to connect to the wifi adapter if you had the right drivers, but seeing as I'm already using those adapters to connect to the internet, there's no chance. |
Hello Willard! I could beta test this feature due to the fact that I own an Xbox One controller. Even though the one I have is from 2014-ish, it will be able to work with a micro-USB --> USB connector. I think you have seen already that the Mozilla documentation does have a thing or two about Gamepad API and libraries that you can incorporate. To be fair, I do own Mac and Windows machines, my Mac running on macOS Monterey and my Windows PC running on standard Windows 10. Just a little inquiry I had, is there any difference between how the Gamepad API is received on Unix-like systems or does it react the same throughout all OS's, whether or not they are Unix-based. PS4 controllers are a little finicky to connect to a PC, while newer Xbox Controllers (Mine is old, so it doesn't have this feature) will be able to tether to Windows Bluetooth automatically, the only action needed is syncing it using the sync button. I am not sure whether Mozilla and JS environments in general will be finicky towards non-OS based gamepads, but taught is just a matter of testing :) Hope I didn't barge in completely, but I am a member of KACC so I would be happy to help with anything y'all need lol |
Yeeeah that wouldn't work. I typically run code dozens of times to figure out what works, print objects to console to explore what values are stored, etc., none of which is possible if I can't run my own code. Having someone else do it would turn 30 minutes of coding into like 12 hours. |
i mean could you show the movement lines maybe someone with a controller like me could try and add support |
I Just Checked They Willard Does Movement And Key Presses woud make it pacticly imposible to have both controller and keyy board support |
I suggest we close this issue and leave it to when we have modding support |
Bottom Text
The text was updated successfully, but these errors were encountered: