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

Make joystick support more reliable #66

Open
vitorio opened this issue Jan 18, 2014 · 9 comments
Open

Make joystick support more reliable #66

vitorio opened this issue Jan 18, 2014 · 9 comments

Comments

@vitorio
Copy link
Contributor

vitorio commented Jan 18, 2014

Joystick support seems intermitted across browsers and platforms. Make this more robust with proper UI indicators.

@jvilk
Copy link
Member

jvilk commented Jan 18, 2014

This is the first I'm hearing about this.

The current issues with joystick support are caused by browser implementations. Chrome doesn't detect newly plugged in controllers until you restart it. Firefox is fine. Other browsers don't support gamepads.

Unless MESS is being weird with the joystick input somehow?

@vitorio
Copy link
Contributor Author

vitorio commented Jan 18, 2014

In my experience, if I wasn't hitting a joystick button exactly when it was checking for me hitting a joystick button, it wouldn't detect it. I have to hold buttons down.

Even if the issue is just browser-specific differences, there needs to be browser-specific messaging about what it takes to get the joystick working. There isn't enough feedback to the user.

@textfiles
Copy link
Contributor

For some reason, the joypad thing seems to be a lot better at Internet
Archive.

On Sat, Jan 18, 2014 at 12:28 PM, Vitorio notifications@github.com wrote:

In my experience, if I wasn't hitting a joystick button exactly when it
was checking for me hitting a joystick button, it wouldn't detect it. I
have to hold buttons down.

Even if the issue is just browser-specific differences, there needs to be
browser-specific messaging about what it takes to get the joystick working.
There isn't enough feedback to the user.


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-32687284
.

@jvilk
Copy link
Member

jvilk commented Jan 19, 2014

In my experience, if I wasn't hitting a joystick button exactly when it was checking for me hitting a joystick button, it wouldn't detect it. I have to hold buttons down.

Yeah, that's because the gamepad API is polling-based. There's nothing we can do on that front, unfortunately.

The spec on events related to button events is blank, and has been blank for years:
http://www.w3.org/TR/gamepad/#other-events

@vitorio
Copy link
Contributor Author

vitorio commented Jan 19, 2014

That doesn't mean nothing can be done.

For example, how long does the polling take to register on each browser and platform? Is it consistent per-browser? Does it vary based on the type of joystick? Let's say you're sure to detect a gamepad or not if they hold a button down for five seconds.

You could improve the experience and make it more reliable by saying, "hold a primary joystick button (A, B, X, Y, fire, etc.) down for five seconds and we'll see if we can detect it." Give them a button to click on to start a countdown and replace it with a success indicator.

There's always something we can do.

@jvilk
Copy link
Member

jvilk commented Jan 20, 2014

Oh! Is this the controller detection in the frontend, or button presses during gameplay?

If you are talking about the former, yes, I know the issue. I was extremely conservative with the callback for that because I did not want to impact performance. I believe it checks every second. However, it should not miss any button presses -- the browser magically makes the gamepad available to the webpage once the first button has been hit, so the callback will see the controller the next time the callback fires.

And yes, there is much more that can be done there. There's the whole chrome-must-be-restarted-if-you-plug-in-a-new-controller business and other things that we could explain.

@ociebieda
Copy link

I and my friends are confused about controls for MESS platforms.
Is there no way to play any game until you have real jostick or pad?
Is there a way to force emulator using keyboard cursors and special keys for fire (ctrl/alt) instead of real controller?
This is the first online emulator that I found unplayable to many people due to unclear controls.

@vitorio
Copy link
Contributor Author

vitorio commented Sep 13, 2014

@ociebieda Unfortunately, each MESS platform and game may have different keyboard mappings for its control schemes. A gamepad is not necessary, but it might take some playing around to figure out each control set. If you're playing games through the Internet Archive, most of them should have control descriptions in the body and links to online scans of the manuals (if you're playing them elsewhere, all bets are off). Sometimes you can hit Tab (I think) to bring up the MESS menus to reconfigure controls, but not always. Unfortunately, the priority of the project has been around getting the systems running, and not for getting particular games especially usable. If there are specific games you have trouble with, you can comment on the Internet Archive page, or file a new issue here (don't just comment on existing ones), and label it as a question.

@ociebieda
Copy link

Most of interested people will going to use these emulators more with games than other software.
Most of interested people dont have real controllers for their PC.
I just suggest to add check box (like it is for sound) which would emulate basic controller (the one that we connect to PC to play with MESS).
Most controllers use mainly 4 way movement and 2 type of action buttons.
Almost every emulator (not MESS) use keyboard arrows as 4 way movement and Z/X or CTRL/ALT (better option, because we dont block alphabet keys that might be used in some games) as action buttons (if we talk about classic computers and consoles), plus enter for START (Nintendo).
This seems to be a standard and these are keys that every emulation fan is trying first.
So idea would be to add check box to turn on or off simulation of controller, and that would do these emulators useful for everyone.
If you need to unlock keys used in simulation for some game, then you just uncheck this option under emulator screen (it is solved this way in some JavaScript emulators and works great).

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

No branches or pull requests

4 participants