Iterative updates and old save files

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Jerio
Newbie
Posts: 7
Joined: Sat Jun 22, 2019 2:20 pm
Contact:

Iterative updates and old save files

#1 Post by Jerio »

Hi all, I'm new to Renpy but I have planned everything about my game and I know I will want chapters, I see many Renpy games are not compatible with the old saves of that game and my game has many choices and is gonna be released chapter by chapter(each chapter to be updated every month or so), what breaks a game to not be compatible with old saves? and how to fix or prevent it? if I know what are the reasons I can plan now to avoid them
Also, I'm sorry if this is a noob question, but I see so many games being broke that makes me think it might actually be hard to fix.

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Iterative updates and old save files

#2 Post by rames44 »

Here are a few things that can cause game programmers to abandon old saves:

1. Updates to the game that require new variables that can't be defaulted. For example, in Chapter 3, it's now very significant which branch you took at one menu in Chapter 2, but you didn't record that in the old version of Chapter 2. So you have to force people to start over again so you can record that choice for the future.
2. Restructuring of the game variables themselves. Basically, you change your mind as to how you're going to organize things, the new way isn't compatible with the old way, and you're too lazy to write an "after load" script that will convert an old save's variables into the new format. (Or, for some reason, just can't.)
3. Just deciding to reorganize the story line in previously released chapters themselves, so you want people to start over.

The use of classes to hold game data, and then needing to restructure those classes, is a common case for #2. The save includes references to the original class names, and to their contents, and if you decide to reorganize, sometimes it can be hard to leave yourself a backwards compatible route where the old game data can even load. In theory, you should be able to do it, but for some folks it's just easier to shrug their shoulders and say "make them start over again." (And sometimes if there's a major rewrite of the internal data management, the pain of doing a transition between old and new can be VERY large, so I can perfectly understand it...)

Jerio
Newbie
Posts: 7
Joined: Sat Jun 22, 2019 2:20 pm
Contact:

Re: Iterative updates and old save files

#3 Post by Jerio »

Thank you for the reply
I feel relieved, it seems like the developers I saw just gave up easily, if I'm organized since the beginning it's ok then
I have some questions though, what if you add a mini-game or a new variable on the new update that does NOT rely on the old save? is that save breaking or is it safe?

User avatar
Autumnotopia
Regular
Posts: 59
Joined: Sun May 19, 2019 8:53 pm
Completed: Making Friends
Tumblr: autumnotopiadev
Github: autumngreenley
itch: autumnotopia
Contact:

Re: Iterative updates and old save files

#4 Post by Autumnotopia »

Adding new things should be fine, you just don't want to be in a situation where the game is looking for something that doesn't exist from a previous iteration
Image
A game about loneliness, chess, and fighting monsters with magic

Jerio
Newbie
Posts: 7
Joined: Sat Jun 22, 2019 2:20 pm
Contact:

Re: Iterative updates and old save files

#5 Post by Jerio »

Thank you very much!

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Iterative updates and old save files

#6 Post by rames44 »

Jerio wrote: Mon Jun 24, 2019 3:07 pm Thank you for the reply
I feel relieved, it seems like the developers I saw just gave up easily, if I'm organized since the beginning it's ok then
I have some questions though, what if you add a mini-game or a new variable on the new update that does NOT rely on the old save? is that save breaking or is it safe?
No, this doesn’t have to be save breaking. For variables, this is exactly what the “default” statement is for - if the save has a copy of the variable, it uses that value, otherwise it uses the default value. So your update always has the variable defined, even from a save from before you added it. You can even use this (in a way) to compensate for “I forgot to save your choice last update.” Make the path choices save a value something like 1, 2, and 3 and then default the variable saving the chosen path to zero. When you get to the critical point later that depends on the earlier path choice, if the value isn’t zero, you know the path they played thru. If it is zero, you know they continued from a save made before you added the “remember the path” back in the previous release’s code. So, you can then ask them, or follow a different path or whatever.

You can also use “after_load” to perform any fix ups you need on variables. I’ve seen many games do this - they have a variable that identifies the version with which the save was made, and use that to know what corrections or additions are required (if any) when a save is loaded.

If people restore a save from after the mini game would have been played, the only issues are any side effects the mini game would have made - like recording won/lost - which comes back to variables again. So, if you’re careful in managing how you add your new variables as you go along, you shouldn’t have any problems.

Post Reply

Who is online

Users browsing this forum: Google [Bot]