Game updates using a patch with Ren'py.

Incyder

Newbie
Jan 3, 2018
20
3
Hello all.

I'm curious, how are you guys updating your games. I am going to use Ren'py for my game creation. However, after packaging and releasing the first installment, what is your workflow to add subsequent releases/updates?

I only want to update the files I've changed in addition to adding new content. I do not want to repackage the game as a whole again to keep the file sizes low. How do I accomplish this? Admittedly, I have not looked to see if it is a feature in Ren'py yet. I was here and the thought hit me to ask. Any input would be appreciated. Thanks.
 

riktor

Active Member
Nov 26, 2018
906
1,161
it's pretty simple for a linear vn, sandbox or something with more complicated scene triggers can be more difficult. General tips would be to make good use of custom classes and label overrides (to avoid replacing older scripts for bugfixes). Packing each new update into it's own rpa will work fine for pc releases but android is a bit tricky, the scripts would all have to be in the main app download but the media files could be separate.
 

Julio

Member
Modder
Uploader
F95Zone Dev
Aug 26, 2017
120
296
If you do happen to publish out just the update files, i'd still encourage you to still upload the entire game just so users new to your game don't have to install a ton of updates to play
 

Incyder

Newbie
Jan 3, 2018
20
3
riktor does that include a class for Characters? And thanks for the warning about android.

jimmy5 that's a very good suggestion, I didn't consider that. So, essentially release a complete package for initial downloads and a patch for existing players?
 

riktor

Active Member
Nov 26, 2018
906
1,161
riktor does that include a class for Characters? And thanks for the warning about android.
Characters perhaps if you intend to have stats or skills and such attached to them. They are more useful for a sandbox style set up, i.e. having a class for locations track scene availability.
 
  • Like
Reactions: Incyder

Incyder

Newbie
Jan 3, 2018
20
3
So it is possible to just publish update files through Ren'py? How does it work?
 
Last edited:

Julio

Member
Modder
Uploader
F95Zone Dev
Aug 26, 2017
120
296
You could watch for file changes, it might be possible to do with a git repo, then just publish changed files, that way since the old images from earlier versions, which have not been modified will not get uploaded, and the games size will be a lot less. If you want more info on git, or any other questions just reply
 

Incyder

Newbie
Jan 3, 2018
20
3
So the only way to apply a game patch for updated content is through GitHub or my own Host server?
 

Julio

Member
Modder
Uploader
F95Zone Dev
Aug 26, 2017
120
296
Using a git was just an idea, there are programs like this:
 

Incyder

Newbie
Jan 3, 2018
20
3
Tha's certainly a brute force way of doing it. I was trying to stop a huge download, and just update files that needed it. Git was probably the best idea so far, if not complicated.
 

Julio

Member
Modder
Uploader
F95Zone Dev
Aug 26, 2017
120
296
The program I sent would be able to analyze the old game files, and the updated game files and from there you could just push the new/changed files as an update, setting up a git repo was my initial idea but I think it'd be more complicated than that program or something similar.
 

TDoddery

Member
Apr 28, 2020
170
160
It's really the images or other media that make up the size. The script files are relatively small.

You could just send out a zip of the rpyc files plus any new images in a simple "images" folder instead of an rpa file.

Players would need to unzip and drop it all into the game folder choosing to replace any files with same name. Obviously not while the game is running.

I've tried that and it worked. I don't know about other media but I would think it's similar.
 

Incyder

Newbie
Jan 3, 2018
20
3
The answer appears to be, so far, kidnap PyTom. Instill fear, and a sense that, in future updates he will ensure freedom. Lets plant the seed. Bury this so deep, he thinks about this when he shits in the morning.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,384
15,293
The answer appears to be, so far, kidnap PyTom.
For what reason ?

Adding a in Ren'py ?
Making that images in a RPA archive will replace any image with the same location and name in a RPA archive that appear previously in alphabetical order ?
Making that a screen will replace any screen with the same name declared in a RPY file that was proceeded previously (still the alphabetical order) ?
Adding a config.allow_duplicate_labels variable (still not documented) that will permit to legitimately defined the same label twice in two different files (still alphabetical order) without triggering an error ?

As said previously, the only thing you need is a RPA with your scripts (rarely more than 10MB) and a RPA file with the media for the last update, dot.
 

Incyder

Newbie
Jan 3, 2018
20
3
For what reason ?

Adding a in Ren'py ?
Making that images in a RPA archive will replace any image with the same location and name in a RPA archive that appear previously in alphabetical order ?
Making that a screen will replace any screen with the same name declared in a RPY file that was proceeded previously (still the alphabetical order) ?
Adding a config.allow_duplicate_labels variable (still not documented) that will permit to legitimately defined the same label twice in two different files (still alphabetical order) without triggering an error ?

As said previously, the only thing you need is a RPA with your scripts (rarely more than 10MB) and a RPA file with the media for the last update, dot.
Thanks. The web updater looks to be somewhat what I needed. The difficulty, especially for new programmers like myself, seems to be in the fact that it is still an undocumented feature. Should I be calling it a feature? Anyways, I shall put away the duck tape and read the document you provided.

I did want to ask though, will the new RPA overwrite existing file structure or will it require new directories for the new media?

Thanks.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,384
15,293
I did want to ask though, will the new RPA overwrite existing file structure or will it require new directories for the new media?
Basically speaking, see RPA files as element that are piled up in order to form a virtual disk.
Therefore, if two RPA archives have a file "game/image/whatever/some path/name.ext", only one of the two will be available.

For the RPA files that have the rpy files, like its size will stay small even after years of development, always put all the scripts inside it, and use always the same name for it. The OS will overwrite the original one each time there's an update, and it will works fine.

For the media, the easiest way is probably to separate your "game/images" directory into chapter. Therefore, the RPA for the first chapter will only have the content of "game/images/chapter 1", and so on. It will avoid conflict, and you can still access the image of the previous chapters if you need to.
Personally I would add a generic RPA file with the common parts (mostly the UI). Its size should stay relatively low, what permit you to replace the file if needed.
 
  • Like
Reactions: Incyder