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

Add analog R and L triggers on Android #8590

Open
wants to merge 3 commits into
base: master
from

Conversation

@jonofarc
Copy link

jonofarc commented Jan 27, 2020

Add support for analog L and R with controllers on Android, including touch controls and button mapping allowing android users to play games that require analog triggers such as Super Mario Sunshine with non analog buttons or with the touch screen

Add option to toggle L and R analogs

Add analog Triggers res files

Add default overlay X and Y position for analog Triggers

Add support for analog L and R with controllers on Android, including touch controls and button mapping

Add option to tooggle L and R analogs

Add analog Triggers res files

Add defaul overlay X and Y possition for analog Triggers

Remove comments
@JosJuice

This comment has been minimized.

Copy link
Member

JosJuice commented Jan 28, 2020

The code changes look fine to me (other than the lint problem that needs fixing), but I would like some input from others about the UX aspects, especially regarding the new virtual buttons that have been added to the touch screen controls. Do we want to have separate buttons for this, and (cc @MayImilae), does the design of the new buttons look fine?

For the reference, if I'm reading the code correctly, pressing the new virtual buttons sends an analog input of full strength (but no digital input).

Screenshot_20200128-161536

@jonofarc

This comment has been minimized.

Copy link
Author

jonofarc commented Jan 28, 2020

For the reference, if I'm reading the code correctly, pressing the new virtual buttons sends an analog input of full strength (but no digital input).

That is right, this will allow android users to use them on games such as Super smash bros melee or super mario sunshine which makes use of analog triggers (specially super mario sunshine as its almost unplayable because of it), also the analog trigger can now be mapped to be used with a controller, the UI wise I did the first thing that came to my mind but I understand if any change has to be made to it, also I am trying to understand what are the lint errors as I see my naming of variables was not proper but I am kind of lost of how to name them any pointer in that regard would be appreciated

@JosJuice

This comment has been minimized.

Copy link
Member

JosJuice commented Jan 28, 2020

Your variable naming is fine. The lint log (https://buildbot.dolphin-emu.org/#/builders/10/builds/212) just says that you have to adjust how much whitespace there is at the start of a few lines.

@jonofarc

This comment has been minimized.

Copy link
Author

jonofarc commented Jan 28, 2020

Do we want to have separate buttons for this, and (cc @MayImilae), does the design of the new buttons look fine?

my reasoning for having separate buttons for it is because a lot of android controllers and android gaming phones (as well as android emulators which I am not even sure if its relevant in this scenario but they do exist) have screen mapping utilities (my case a red magic 3s) and adding the extra screen buttons (which could be optional or toggled off by default) its an option if you do prefer using such tools

@jordan-woyak

This comment has been minimized.

Copy link
Member

jordan-woyak commented Jan 28, 2020

Like JosJuice was getting at, pressing these new buttons activates analog trigger inputs at full strength, but is there no way to send less than full strength? You can't drag your finger up and down or anything?
If that is the case, I don't think that is sensible.

@jonofarc

This comment has been minimized.

Copy link
Author

jonofarc commented Jan 28, 2020

Like JosJuice was getting at, pressing these new buttons activates analog trigger inputs at full strength, but is there no way to send less than full strength? You can't drag your finger up and down or anything?
If that is the case, I don't think that is sensible.

Currently I have only tested with a ps4 controller with this but analog triggers do work in such scenario its not full strength that gets sent its only full strength if you use the touchscreen buttons or you map a non analog button to the analog triggers, as far as I am aware its more important the difference of analog vs digital than the value of the analog itself (Again going to examples of smash bross mele and super mario sunshine as both perform different actions not bases of the strength of the analog but rather if its a full pull vs a non full pull)

@jordan-woyak

This comment has been minimized.

Copy link
Member

jordan-woyak commented Jan 28, 2020

I'm aware that most games do not rely on varied analog trigger presses but not providing that functionality through the touch UI when you've gone this far to implement it seems silly.

Edit: I think it might even make more sense to modify the existing L/R trigger UI buttons to have the analog + digital functionality.

@jonofarc

This comment has been minimized.

Copy link
Author

jonofarc commented Jan 28, 2020

my only concern in that scenario would be that that would limit the functionality with screen mapping tools (wich I use and its the reason I decided to try to implement this feature)

@jordan-woyak

This comment has been minimized.

Copy link
Member

jordan-woyak commented Jan 28, 2020

I'm imaging a slightly larger button with an analog press area on the bottom and a digital press area above it.
As long as you have separate regions for analog and digital that would work with your utilities?

@jonofarc

This comment has been minimized.

Copy link
Author

jonofarc commented Jan 28, 2020

I was actually thinking about that, either separating the button into 2 different buttons that when together they will look like the whole or trying to see if button view can be separated into 2 views encapsulated by a larger view that will contain the trigger image and each area corresponded to a analog and digital respectively. I will try to see if this is achievable with my current knowledge

…ved dedicated analog L and R triggers on touchscreen
@jonofarc

This comment has been minimized.

Copy link
Author

jonofarc commented Jan 30, 2020

I updated the PR adding the option for Touch controls to have secondary functions (in this case triggers have analog function as well as digital) as of now I removed the dedicated touch control for analog triggers and now if you touch the upper half of the trigger an analog press would be registered if you touch the bottom half a digital press would be registered also there is ui feed back as the pressed state is different

IMG 2

IMG 1

reflecting either an analog or digital trigger press

jonathan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.