Hello Nicholas, Thank you for your feedback!
For remembering the highscore between sessions I use the basic file system of Godot using "user://savegame.save" as path.
var data = {
"h" : max_height,
"b" : max_buildings
}
func save_data(data:Dictionary):
var save_file = FileAccess.open(SaveFile, FileAccess.WRITE)
save_file.store_line(JSON.stringify(data))
and then for loading:
func load_data():
if not FileAccess.file_exists(SaveFile):
return
var save_file = FileAccess.open(SaveFile, FileAccess.READ)
var dict = JSON.parse_string(save_file.get_line())
max_buildings = dict["b"]
max_height = dict["h"]
if you have any more questions feel free to ask!