exch-bms2 / beatoraja

Cross-platform rhythm game based on Java and libGDX.
GNU General Public License v3.0
627 stars 146 forks source link

Make the game window not resizable #759

Closed blmarket closed 7 months ago

blmarket commented 10 months ago

Tiling window manager tries to move all the windows in the tile, the game shows skewed screen regardless of configured value.

Making the window not resizable will fix that issue, allowing the window to be positioned and sized as configured.

staticssleever668 commented 10 months ago

the game shows skewed screen regardless of configured value.

I kinda disagree, one way or another, if that's an issue for you, e.g. because you have several tiles visible in the workspace, you will have to put the window in full-screen. With this patch, you will be forced to always go into full-screen, but without it you can still have the task bar visible or you can even put the game in a corner tile.

Also should be noted: right now it follows LR2!!! :smile:

blmarket commented 9 months ago

One thing to make sure: it does not make the window full-screen. It only change window to be not resizable.

Without this PR, the screen will be showing as following: Screenshot from 2023-10-17 07-39-02

With PR applied: Screenshot from 2023-10-17 07-37-58

I agree it won't allow the window to be placed in a tile, but who would be interested to play a game with broken window aspect?

staticssleever668 commented 9 months ago

it does not make the window full-screen

All instances of "full-screen" in my previous message can be replaced with "floating mode". :)

Why don't you just make the game start in floating mode for yourself? I'm really against forcing the option from the PR on everybody. You can use this rule in Awesome WM

    {
        id = "my cool beatoraja floating mode",
        properties = { floating = true },
        rule_any = { class = { "beatoraja %d.%d.%d", }, },
    },
blmarket commented 9 months ago

For my common sense if a game has a configuration for its screen resolution, it should be honored first and does not allow to be modified. From my experience beatoraja is the only app which ask user for window size, then ignore it when window manager tries to change its size.

Do I need to modify my window manager not to do this? Maybe.

Can we make the app window non-resizable? Why not.

SackMagiclight commented 9 months ago

I personally disagree, as I have observed users who play with resized windows. This is especially used in multi-display environments with different resolutions. This is because currently, due to the library, it is not possible to select the display on which the game is shown. https://github.com/exch-bms2/beatoraja/issues/528

I think that the screen collapse when resizing should be considered first to fix the skin side, not the main unit side. (Some skins are written not to support resizing to reduce implementation time.)

blmarket commented 9 months ago

Re: https://github.com/exch-bms2/beatoraja/pull/759#issuecomment-1767573400

Just want to check what is the purpose of window size configs. If they are to provide sort of constant gameplay experiences then resizing(especially with different window aspects) could be prohibited. If they are to just to provide some initial configs then this PR may not be merged.

My personal opinion is that game developers usually don't expect different window aspects other than standard ones. The game does not look great with 90' rotated monitor screen size, and people like me suffer from invalid window size from the beginning. But I would understand if the game values more on "whatever freedom the user can do" than small conveniences like this and just discard this PR.

It looks #528 is about user not able to choose the right window size they want to use, where window resizing is being used to mitigate that bug. For me it's also unusual use case due to missing window size config user want to use, and could be fixed with upgrading library etc, then it would no longer block this PR's purpose.

I think "how the game is playing in unusual window aspect" is a separate problem and not the concern of this PR. It's way harder to make the game responsive to any window aspects and I don't think the game should support that way.

SackMagiclight commented 9 months ago

I just thought, this PR is hard coded as resizable = false, but I feel it would be preferable to make this optional. I feel this would give an option to both those who used to use resizable and those who were disadvantaged by resizable.

(Of course, as stated, it would be better if the various library issues are resolved.)