0 votes

Hi,

I've started a small game project for school and one of the features i have to implement it's a basic save system. I've checked the tutorial in the official docs, however i don't know if it's suitable for me since i want to use binary files for saving instead of JSON files.

Initially i thought of a monolithic design of some sort, like the saving / loading process it's managed by a singleton or a global class. But now, I'm thinking of a more scene approach system. It's a bad idea having every scene, every time that scene enters the tree and calls ready, to handle the load of what the scene needs ( for example, player position or health for player scene).

For saving, I would be something like this:

get_tree().call_group() 
# Check if has method
# call save

Since I don't plan on using a lot of scenes and transitions, Is this advisable or could lead to potential pitfalls?

Thanks in advance.

in Engine by (18 points)

1 Answer

0 votes

Yeah - the saving docs are desperately in need of an update. What you're doing is fine - the saving method in the docs should work for JSON as well as binary files.

I did open a pull request to update the saving docs but I somehow managed to squash every commit into one lol

by (8,526 points)

Thanks for the advice. I will do it that way then.

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 Frequently asked questions and 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 [email protected] with your username.