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

Implement config management with filesystem save #37

Open
ryukinix opened this issue Oct 28, 2020 · 6 comments
Open

Implement config management with filesystem save #37

ryukinix opened this issue Oct 28, 2020 · 6 comments

Comments

@ryukinix
Copy link
Collaborator

Use the Toml format, pretty common in games. We should probably use a external library. It's possible to use a std::map to load the config to memory. It should handle the SDL configs, resolution, renderer options and specific game options.

Methods:

  • save
  • load
@wesleycsj
Copy link
Contributor

wesleycsj commented Oct 28, 2020

I never heard before about Toml, since i thought .INI file was most used. We have at least 4 filetypes to choose: Toml, JSON, Yaml and INI files(what is really common), but this is about game configs, not engine. And since we are talking about our engine specific config files, we can provide only a own file model with key-value structure(we don't want to waste too much time writing a parser for a complex file).

I think we should separate what is game config and what is engine config, these engine configs should be in the game binaries and the game configs should be exposed in the user-space. As example, in any game, you can go to a file in the documents folder and configure some videos configuration like resolutions and VSync, maybe which renderer use( but not internal configs for this renderer) things related to the user-experience, but you can't choose which alpha blending your renderer will use, this is not user stuff. So, reading your description i understand we're talking about engine configs.

@ryukinix
Copy link
Collaborator Author

The Toml is a more reliable version o ini files.

@ryukinix
Copy link
Collaborator Author

So, reading your description i understand we're talking about engine configs.

We are talking about game config.

@wesleycsj
Copy link
Contributor

And, in case of we choose TOML, do you think in write ourself a parser or just use the code provided in the official website?

@ryukinix
Copy link
Collaborator Author

And, in case of we choose TOML, do you think in write ourself a parser or just use the code provided in the official website?

Use a reliable TomL parser statically linked.

@ryukinix
Copy link
Collaborator Author

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