Gamepad won't work

Bugs will be moved here once resolved.

Post » Fri Jun 13, 2014 9:22 am

Problem Description
Gamepads won't work on Google Chrome and Node-Webkit. But they work nearly perfect on Firefox so far.
I am using a PS4-Gamepad which works perfect for other game-engines though.

Description of Capx
It's the example for Gamepads.

Observed Result
There is no input registered and the gamepad is not detected.
In Firefox all buttons work perfect however the second Y-Axis always returns the value 100 for the Axis and 1 for RawAxis.

Expected Result
I expect that my gamepad works for all browsers including Node-Webkit.

Affected Browsers
  • Chrome: YES
  • FireFox: NO

Operating System and Service Pack
Windows 7 64 Bit SP1

Construct 2 Version ID
r172
B
6
S
1
Posts: 3
Reputation: 306

Post » Fri Jun 13, 2014 12:28 pm

Gamepad support depends on what the browser supports, and is not related to any code in C2. The Xbox 360 controller should work out of the box (and Xbox One when the driver comes through Windows Update), but the PS4 controller needs drivers to be installed to work on Windows. Maybe Firefox wrote their own driver for it and built it in to their browser, but that's specific to them. Closing as not a bug.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Fri Jun 13, 2014 9:06 pm

Well the PS4 Controller is plug and play. It works on Windows, Mac OS X and Linux out of the box. I can even connect it to my android devices and it works instantly. Also the gamepad becomes more and more widespread due to the fact that Microsoft hasn't developed the Xbox One gamepad driver. At least I highly recommend to integrate support for PS4-Controllers. It would also give Sony users the abillity to play HTML5 games on their console which offers a great chance to target a bigger audience.
B
6
S
1
Posts: 3
Reputation: 306

Post » Sat Jun 14, 2014 12:09 pm

I don't think the PS4 controller is plug and play on Windows. Everything I've read says there are no Windows drivers for it so you need to get special software to make it work. For example see the instructions here: http://www.cnet.com/uk/how-to/how-to-use-your-xbox-or-playstation-controller-on-your-pc/

There is nothing we can do to fix this: if there are no Windows drivers for a controller it won't recognise the gamepad at the system level, so the browser won't know it exists, so the C2 engine won't know it exists.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

Post » Sat Jun 14, 2014 3:07 pm

Just want to add my experiences with gamepad issues. I have PS4, generic, and Xbox gamepad that I've used in development of a game. You're going to have varied results regardless of the game controllers with windows 7, 8, and 8.1.. You'll find some work on some OS and some don't. On my one laptop I was using windows 8 and could use PS4 or generic but, when I upgraded it wouldn't work in the browser, but would work if I made an EXE. Of coarse the Xbox controller now worked fine. After a lot of research and testing on different systems, I came to the conclusion it's all in the O.S. version and how they interact with the browsers. It has nothing to do with C2 or the browsers. It's all in the O.S. versions and there is really nothing that you can do to make every gamepad work all the time.

Good Luck
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Sun Jul 10, 2016 6:57 am

Okay, I get it now. Chrome doesn't have controller support. However, I found there is a way to program controller support in HTML5.
http://gamedevelopment.tutsplus.com/tutorials/using-the-html5-gamepad-api-to-add-controller-support-to-browser-games--cms-21345
Next question, what happens when you port the game? Will it be controller friendly when the game is exported as other types of files like a ".exe"?
B
16
S
6
G
2
Posts: 165
Reputation: 3,209


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests