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

[Feature]: scalable keymaps based on aspect ratio #155

Open
1 task done
FlyMeToTheMoonAndLetMePlayAmongTheStars opened this issue Jan 5, 2023 · 1 comment
Open
1 task done
Labels
enhancement New feature or request

Comments

@FlyMeToTheMoonAndLetMePlayAmongTheStars
Copy link
Contributor

Is your feature request related to a problem?

kinda?

right now keymaps do not scale according to aspect ratio, a keymap made for 16:10 will not work properly after switching to 16:9, 21:9, 4:3, and so on. so different keymaps will have to be created for different aspect ratios

Describe the solution you'd like

make keymaps scale according to the aspect ratio

i think currently keymap positions use absolute coordinate values, that's why they don't scale properly when used on a different screen ratio, maybe instead of absolute coordinates they can be made relative to the edges of the window width and height? in theory this should work since most in-game touch UI elements also scale accordingly

Anything else?

not atm

Issue Language

  • Yes my issue is written in English
@XuYicong
Copy link
Member

XuYicong commented Feb 1, 2023

This is very hard to achieve if ever possible. Current keymaps already use relative coordinates to place elements, but that still doesn't fit game UI. This is because game UI elements are not always scaled propotionally.

Take Unity games for an example. Game UI elements usually anchor at the corner or edge of the screen. Without knowing specificaly how they are anchored, we have no information based on which to scale our keymap.

Read this Unity doc for detailed explanation on anchors. Current behaviour of our keymap is like placing the four anchor points all at the center of every element.

One way of getting around this is to guess the anchor points of keymap elements based on their position in the screen. Like, if a keymap element is placed near the corner, then anchor it at the corner, and so on. But this may work in one game but fails in another game. People not understanding this behaviour would report it as a bug.

Another way is to let users set the anchor for each element in the keymap editor. But this would make the editor too complicated. I believe 99.9% of our users won't understand the concept of anchors in one minute.

@Depal1 Depal1 transferred this issue from PlayCover/PlayCover Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants