Replies: 6 comments 4 replies
-
I debated this (with myself). Here are the main reasons why I chose to place it in assets:
Not sure I agree. This complicates the current system a lot.
I agree. But this is a lot more complicated for now because the game's GUI is pretty much hard coded. It also means changing the in-memory config as well as the file and handling any other edge cases. For example, changing resolution should change the game resolution in game.
It wasn't my plan to touch the settings app at all. IIRC, I started with the support for selecting monitors. However, now that I did, I plan to quickly write a replacement and ditch it. The main reason is that the old app is horribly out of date and confusing:
|
Beta Was this translation helpful? Give feedback.
-
My reasoning for the game engine calling the settings app is a little along the following lines: The settings app needs to have code that checks screen resolutions, and what is available. It also needs code to read the config file and hopefully do some error detection and so on. Rather than implementing that in the engine again, just have the engine ask the settings app for a valid configuration to play from. So, less duplicating of code. Maybe the vsettings app can have a --check mode that just returns true if the config file is good? |
Beta Was this translation helpful? Give feedback.
-
There are a lot of obsolete options in the settings app, I agree. |
Beta Was this translation helpful? Give feedback.
-
As per your request, the config.json file needs to be in a place where the user can modify it without system privileges. Something similar should exist for config.json to enable changes made to the default configuration to survive when the Assets are refreshed with an upgrade. |
Beta Was this translation helpful? Give feedback.
-
There should be settings exposed from the game engine, and then contributed to by the game assets. For the engine itself, we should have a configuration object - libconfig - that deals with all the universal game engine configuration values. This would get exposed to the Python side so that the Game Assets can provide a UI for viewing and setting them. Some can be allowed to be read-only if we don't want them to be set but the game assets need to use them. I do agree that the Game Assets should own the Settings interface so that it can be skinned to match the game. |
Beta Was this translation helpful? Give feedback.
-
So the game should be able to present the access to the settings menu from the different points:
Granted the UI stuff is pretty hard-coded right now so let's focus on just getting it to the main menu first with the idea that it'll show up other places in the future, and we can work towards making things more flexible in the process as a long term goal. |
Beta Was this translation helpful? Give feedback.
-
Moved from vegastrike/Assets-Production#135 (comment)
@evertvorster :
"Since this is a new venture in settings for Vega Strike, can we agree on a rough list of requirements for the configuration app?
Having the settings app separate from the main application is weird, and counter-intuitive.
Ideally, the game engine should call the settings app on startup.
The settings app should then check to see if there is a valid configuration file.
If there is, check to see that the requested resolution and screen in the configuration file is available.
If it is, and the settings app was just called to check that screen is available for the game to run on, pass that information back to the game engine, together with the requested screen information.
If the configuration file does not exist, or does not have a valid screen configuration anymore, give the user the choice of which screen and resolution to run on, and save that to the config file, then return that information back to the game engine.
Now, you should also be able to call the configuration app from the game menu. When you call it like this, then the configuration app should expose all the configuration options and at the end write that to the configuration file, and return back to the game.
It is my humble opinion that this should be in place before we start porting over each of the settings that is possible with the old settings app. We could then incrementally move over settings that makes sense. There are also quite a few settings in the original configuration file that is not settable in the app, and you needed to modify the configuration file directly. Stuff like assigning keys to buttons on the joystick, which axes does what and so on. That might be a good reach goal for sometime in the future."
Beta Was this translation helpful? Give feedback.
All reactions