Gamepad in html5 (DEF-3931) (SOLVED)

#1

Is there any way to make gamepad working in html5?

1 Like

Gamepad axis missing?
#2

I assume you have to make an extension that wraps Gamepad API https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API

2 Likes

#3

Nice example of gamepad using on web: https://github.com/luser/gamepadtest and on-line demo: https://luser.github.io/gamepadtest/
I suppose we just need for call html5.run(get_my_nice_gamepad_state()) in our update() function

2 Likes

#4

We should include HTML5 gamepad support in the engine, but until that time you suggestion of a native extension is a very good idea. Please make it and share!

1 Like

#5

Thank you all.
I will try to make native extension. Not sure how difficult it is but it sounds fun. Will keep you updated.

4 Likes

#6

let me know please is there any progress on supporting HTML5 gamepad in Defold?

0 Likes

#7

No, I’m afraid there’s no news regarding this. What is the current status of gamepad support for HTML5? Is there a single API agreed upon by the Google, Mozilla, Apple and Microsoft?

0 Likes

#8

if check out Browser compatibility
looks like all modern desktop browsers support it. but dunno about single API to be honest.

0 Likes

#9

Useful site https://html5gamepad.com

1 Like

#10

I tested Xbox 360 Controller on windows in Chrome / Firefox / Microsoft Edge, works fine.

2 Likes

#11

Dualshock 4 v2 working fine. Connection Bluetooth. Browsers: Latest Chrome and Safari.

3 Likes

#12

Solved in 1.2.157 Defold 1.2.157 has been released

2 Likes