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

Gamescope addon? #50

Closed
Eoin-ONeill-Yokai opened this issue Mar 10, 2023 · 4 comments
Closed

Gamescope addon? #50

Eoin-ONeill-Yokai opened this issue Mar 10, 2023 · 4 comments

Comments

@Eoin-ONeill-Yokai
Copy link

Would it be possible to allow an optional gamescope installation to be used to manage the windowing of SRB2Kart? For example, by running:

flatpak install org.srb2.SRB2Kart.gamescope

We could install the gamescope binary as an optional extension so that we can use that for windowing? This would solve issues like #42 where windowing rules are causing a crash due to invalid geometry. Windowing would be bypassed entirely and handled by gamescope itself, which by extension supports various scaling methods (nearest neighbor being the best for this particular game.) Additionally, it also makes the game more flexible to abnormal resolutions as a whole (for example, vertical screens.)

@Lonsfor
Copy link
Contributor

Lonsfor commented Mar 11, 2023

how is that done exactly?

@Lonsfor
Copy link
Contributor

Lonsfor commented Mar 11, 2023

also what is stopping someone from using gamescope right now?

@Eoin-ONeill-Yokai
Copy link
Author

how is that done exactly?

I'm not sure of all the ins and outs work on flatpak extensions, but they seem to be a flatpak feature that allows for optionally installed utilities to be layered onto a system. There's some talk about it here but basically you'd add an optional package that can be layered onto the environment of SRB2Kart flatpak environment. It seems that the flatpak Steam repo uses this for layering gamescope optionally into the steam installation.

also what is stopping someone from using gamescope right now?

Right now, trying to launch the flatpak version through gamescope (when installed on the host system) ignores the gamescope context and boots it's own context. Being able to wrap the executable in gamescope would be a big boon to users who wish to only install the flatpak version of SRB2kart without dealing with external applications (for example, silverblue users who might not have gamescope installed on the root system.) This issue wasn't a big deal for me before on xserver, but something about KDE Wayland, multimonitor and the flatpak build are causing weird windows sizes to be detected and passed into SRB2kart, causing a crash.

I think I remember gamescope working on the older flatpak builds of SRB2kart but for some reason it no longer restrains itself within the gamescope context (probably since around 1.6). So running the following command on a system with native gamescope installed:

gamescope -h 1080 -- flatpak run org.srb2.SRB2Kart -opengl

Will still properly boot srb2kart but won't do so within the gamescope context itself. I think (via observation only, no research) it will generally show the "startup" screen of all the assets being loaded within the gamescope context, briefly close and reopen in a non-gamescope context. There's probably a source-code level fix for this in SRB2kart that's worth investigating, but I don't really have the proper environment to develop the flatpak build myself to test why this seems unique to the flatpak instance itself.

Building SRB2Kart from source notably does not have this same issue. Gamescope will contain the Kart instance and there will be no crashes even on KDE wayland multi monitor. I seem to only have this issue with the flatpak.

@Lonsfor Lonsfor mentioned this issue Mar 12, 2023
@ghisvail
Copy link
Collaborator

ghisvail commented Apr 2, 2023

Closed by #51

@ghisvail ghisvail closed this as completed Apr 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants