Hello, all!

I am new to Godot and to game dev, but have programming experience in C# and C++.

I am creating a 2D story/puzzle game where the characters and plot is the main focus.

What I am not sure about is best practices for where/how I should be storing variables that permanently change the world when a condition changes, or how to maintain and remember decisions and dialogues that the player has had with multiple characters over time.

Does anybody have experience doing these things in a story-based game and have advice on best practices? Optimal game performance is important to me as well (or at least optimal enough that my simple game doesn't have performance issues).

Thank you!

Okay, so from what I understand, a singleton autoload allows for persistent global variables in a way? So when new scenes begin, those singleton variables are loaded? Can those variables be modified anytime within the game?

Correct, the auto load is basically a global variable script.

8 days later

But like cyberreality said, you will have to write those variables to a file in order for them to be saved after the player closes the game. This isn't as hard as it sound. Keep coding! =)

@OpinionatedGamer said: But like cyberreality said, you will have to write those variables to a file in order for them to be saved after the player closes the game. This isn't as hard as it sound. Keep coding! =)

Is there a way to keep the player from editing that file saved on their hard drive? Also how can devs keep players from accessing assets or spoilers in your game?

a year later