On the back of this thread https://gbatemp.net/threads/tutoria...n-4-0-0-and-add-your-html5-games-here.499813/ I went on the search to see if we could bind the controls on the switch to a custom html game when using the browser via
SwitchBruDNS
I'm not well versed in html5 or JavaScript but I did manage to create a proof of concept that allowed me to bind custom controls to a html5 game
This uses the gamepad api to allow you to bind gamepad keys to your game
Your welcome to try this game out I made (followed a tutorial and added the gamepad keys after) and when I get around to it later this afternoon I'll post some further information
https://switchgame.000webhostapp.com/index.html
This uses the left/right DPAD to move left and right on the paddle - I also binded the R and L button because I cannot figure out how to make the game full screen and the DPAD tries to scroll the website/select links
EDIT:
Here's the button codes I used with the Gamepad API to allow me to bind controls
Here's the tutorial I followed to create the examples above
https://gamedevelopment.tutsplus.co...ontroller-support-to-browser-games--cms-21345
SwitchBruDNS
I'm not well versed in html5 or JavaScript but I did manage to create a proof of concept that allowed me to bind custom controls to a html5 game
This uses the gamepad api to allow you to bind gamepad keys to your game
Your welcome to try this game out I made (followed a tutorial and added the gamepad keys after) and when I get around to it later this afternoon I'll post some further information
https://switchgame.000webhostapp.com/index.html
This uses the left/right DPAD to move left and right on the paddle - I also binded the R and L button because I cannot figure out how to make the game full screen and the DPAD tries to scroll the website/select links
EDIT:
Here's the button codes I used with the Gamepad API to allow me to bind controls
Code:
Buttons[0]: B
Buttons[1]: A
Buttons[2]: Y
Buttons[3]: X
Buttons[4]: L
Buttons[5]: R
Buttons[6]: LZ
Buttons[7]: RZ
Buttons[8]: Minus
Buttons[9]: plus
Buttons[10]: left stick (press)
Buttons[11]: right stick (press)
Buttons[12]: DPAD up
Buttons[13]: DPAD down
Buttons[14]: DPAD left
Buttons[15]: DPAD right
axes[0]: left analogue lef/righ
axes[1]: left analogue up/down
axes[2]: right analogue left/right
axes[3]: right analogue up/down
Here's the tutorial I followed to create the examples above
https://gamedevelopment.tutsplus.co...ontroller-support-to-browser-games--cms-21345
Last edited by naed06,