0 votes

Does Godot only support ini config files or are there any other/better formats? (to store settings & player progress)

I couldn't find any information about it in https://docs.godotengine.org/de/stable/classes/class_configfile.html.

in Engine by (140 points)

I believe you should be able to use JSON too

1 Answer

+1 vote
Best answer

When you don't need a standard format, Godot's INI implementation (ConfigFile) is a superior format to JSON :)

While not standardized, ConfigFile can be used to serialize any Godot datatype without having to convert it to a string or an array/object first. Also, unlike JSON, it features an actual integer type, which prevents bad surprises when saving and loading configuration.

Even if you intend to write ConfigFiles by hand, it's more permissive than JSON. For instance, it allows adding comments to your files (which will be lost when saving, though).

Still, Godot supports JSON using the JSON class.

by (10,485 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.