Noob question about old savefiles and versions updates

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
tcassat
Regular
Posts: 30
Joined: Tue Oct 03, 2017 7:32 pm
Contact:

Noob question about old savefiles and versions updates

#1 Post by tcassat » Fri Nov 10, 2017 5:46 pm

Hello guys. First of all I would like to thank you guys because all the questions I ask are answered quickly.

My new question:
I make a Visual Novel in another engine and launch several updates. When players download the updates, they copy the old saves and continue playing to see what the new content is.

Now I'm doing a port pro for Renpy and I believe this will not be possible anymore, right? With each new update, will players have to start a new game? Or does Renpy have any function to make updates to the old versions and avoid these problems?

User avatar
Remix
Eileen-Class Veteran
Posts: 1628
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Noob question about old savefiles and versions updates

#2 Post by Remix » Fri Nov 10, 2017 9:21 pm

Ren'py has a number of facilities to enable 'on-the-fly' game updates. It supports persistent data (data saved between all saves), defined save folders (for games with various chapters that might want to run from previous ones), a web based updater for version increments (for ad-hoc content additions) and various functions that sit in the background to limit the number of hiccups (e.g. config.on_after_load (s.p.?))

If you have a server that can handle a basic request/response cycle, it should not be too tricky to get a game running that looks for updates upon start, allows download and then continues from where it was... when I say 'not too tricky' I mean not impossible (though it might need a forum question or two more)
Frameworks & Scriptlets:

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Noob question about old savefiles and versions updates

#3 Post by PyTom » Sat Nov 11, 2017 8:18 pm

In general, Ren'Py should support loading old save files on new versions of the game and the engine.

In practice, it depends on how you change the game. The thing Ren'Py is really bad at is when you refactor a game - if you move code from one file to another, you can have trouble loading because Ren'Py can't figure out which line corresponds to which. The same problem happens if you reorder lines in a single file. Basically, once you release your game, you should avoid those things.

Ren'Py also requires the .rpyc files to ensure this information. So you should ensure that the .rpyc files you have shipped get updated by Ren'Py, rather than starting again from scratch.

Finally, you have to worry about the introduction of new variables. The default statement is good for this, as it will set the default on the load of a save game, in addition to setting it at the start of a new game.

Note that the reverse is not supported at all - you can't load a save from a newer Ren'Py in an older version of the engine, and it probably won't work well when it comes to downgrading a game.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Google [Bot]