Saving between games
How a Godot game on Shiny Gen keeps small values after it is closed, how Trail Pals already keeps a best score, and how to count wins too.
Save keeps a value
A game can keep small values on the device with Save: Save.set stores a value under a name, and Save.get reads it back, with a default for the first time. Trail Pals already uses it for the best score: it reads moncatch_best when the world is built and writes it at the end of every real round.
The title demo never reaches that line, because a round that is not being played starts again instead.
Godot 2D Advanced is a course for paid accounts. The rest of this lesson, and its guided session, are in the app.
Next lessonFinishing a game