How to Save the Player Settings with ConfigFile (Godot tutorial)

Channel:
Subscribers:
293,000
Published on ● Video Link: https://www.youtube.com/watch?v=IrUhyf-g5hU



Duration: 12:02
21,917 views
402


Learn how to save game data to the disc using the config file system.
Make Professional 2d Games (Kickstarter): https://gdquest.mavenseed.com/courses
----
Download the start project (example 12 in the start folder): https://github.com/GDQuest/Godot-30-days-tutorial-challenge-2017

Godot has 2 features that make it easy for you to serialize data, thus write and load save games. One is the ConfigFile class, that creates INI style outputs. This is the same class that is used to generate and read the config.cfg file in every Godot project. These files have an easy to read, linear structure, with sections and key-value pairs.
It works well for simple games, where you have but a handful of variables to store. But also if you want to store the core datatypes from Godot: ConfigFile can store and retrieve variables of type Color, Vector2, Matrix32... Due to its simplicity, it’s often the preferred format for user-defined game settings.
Then, there is JSON, which we can get convert to and from a dictionary. We will see that in tomorrow’s tutorial.

Daily tutorials series! 22/30
The playlist: https://youtube.com/playlist?list=PLhqJJNjsQ7KEr_YlibZ3SBuzfw9xwGduK
Project sources on Github: https://github.com/GDQuest/Godot-30-days-tutorial-challenge-2017

This tutorial is supported by:
- Gamblify: https://www.gamblify.com/
- Pineapple Works: http://pineapple.works/

Subscribe to the channel now and become a member of the community! https://youtube.com/c/Gdquest?sub_confirmation=1

Follow GDQuest on:
Twitter: https://twitter.com/NathanGDquest

This video is licensed under the CC-By 4.0 license: https://creativecommons.org/licenses/by/4.0/

You can attribute it to "GDQuest and contributors - https://www.gdquest.com/"







Tags:
save game Godot
GDquest
save settings godot
ConfigFile
Save tutorial
Godot game engine
Godot tutorial
game development
programming
GDscript
save game tutorial
Nathan Lovato
save
godot
tutorial
open source
game creation
game creation tutorial
gamedev
godot engine
example
game
game programming
config file