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

Support gamemode #950

Open
1 of 5 tasks
noah1510 opened this issue May 11, 2024 · 2 comments
Open
1 of 5 tasks

Support gamemode #950

noah1510 opened this issue May 11, 2024 · 2 comments

Comments

@noah1510
Copy link
Contributor

noah1510 commented May 11, 2024

On Linux many people use https://github.com/FeralInteractive/gamemode to boost their pc automatically when gaming.

The support would be in two parts:

  • run smapi using gamemode (Adding gamemoderun to unix launch script #952)
  • Provide a default gamemode config
    • Figure out what changes to the stock gamemode behaviour would benefit smapi
    • Add that config to the installer script for linux
    • Make sure the installer doesn't overwrite an existing config file

The gamemode provides two main ways to start games using it.
One is by calling a c header only function and the other is a helper program.
Since smapi already has a Linux specific launch script, using 'gamemoderun' seems easier.
I already opened a PR to support this and didn't find any bugs even after hours of playing with this change.

The only thing that would be missing is a Smapi specific gamemode config file.
I think it would be good to ship future smapi version with a gamemode config.
It just has to be placed on the same dir as the StardewModdingAPI executable
This config is not strictly necessary and most of the benefits are from running the game using the default configuration but it would still be nice to have some smapi optimized config by default.
However it would require some special handling in the installer to prevent it from being overwritten after each update.
Many users might change that file to fit their needs (e.g. in case of laptops with iGPUs and a proper one).
An update should not overwrite this which in turn would annoy the users that have to update their config after each SMAPI update.

@test482
Copy link
Contributor

test482 commented Sep 2, 2024

"run smapi using gamemode" might out of a mod api tool's responsibilities?

steam version game can run with gamemode by edit game launch options. most 3rd game manager client, such as Lutris and Heroic, already have "gamemode" option.

@noah1510
Copy link
Contributor Author

noah1510 commented Sep 9, 2024

gamemode contains utilities to include in games directly that allow the game to always run with gamemode if available. Integrating gamemode into games is encouraged by the gamemode team.

Given that the PR was only a few lines in the launch script and there have been no reported issues, I don't see why this shouldn't be supported in smapi directly.

That being said I am not sure if adding an optimized default config should be part of smapi.

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

2 participants