[Cancelled]Dropbox Integration for Save File Synchronization

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Message
Author
User avatar
PyTom
Ren'Py Creator
Posts: 16093
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:

[Cancelled]Dropbox Integration for Save File Synchronization

#1 Post by PyTom »

For a while I've considered adding some sort of save-file sync system to Ren'Py. The vision I have is being on a position where I can save a game on my desktop, load that save on my tablet, save again when I'm done with the train ride, and then load the game again on my laptop when I get to my destination. What's been holding me back is that this requires a web service component, and I don't really want to have to run that myself.

I'm considering integrating support for Dropbox into Ren'Py. The idea is that Ren'Py games could choose to display a Dropbox button. When that button is chosen, Ren'Py will open a page on Dropboxes's website, allowing players to log in. Once logged in, the player will be given a code that they can type into Ren'Py to finish the connection.

Once connected, saves will be both saved locally and uploaded to the server. Loading would be done from the dropbox-hosted file or the local file, whichever is newer.

This wouldn't require any software beyond Ren'Py, as there's a simple MIT-licensed dropbox client I could include as part of Ren'Py. It would be secure - Ren'Py would never see your Dropbox password, and the token Dropbox gives us would be limited to accessing Ren'Py-related files. And it would be opt in - if you don't enable Dropbox support, Ren'Py would not behave any differently than it does today.

I'm not sure I like tying Ren'Py to a commercial service - but I don't think it is a huge problem in this case. Games would keep working if Dropbox went down, but would be limited to being saved locally.

What do people think? Are there reasoned objections to this plan? Would you use it? (I don't want to spend time on code nobody else would use.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Shiroisalva5
Newbie
Posts: 22
Joined: Thu Jun 13, 2013 5:54 pm
Projects: The fountain in the woods, Stained with Magic, Bog
Organization: Hikage Studios
Deviantart: saruva05.deviantart.
itch: kuroi05
Location: Italy
Contact:

Re: Dropbox Integration for Save File Synchronization

#2 Post by Shiroisalva5 »

Hi PyTom,

I don't see any negative effects about this idea. I personally am a dropbox user and i also find it somehow frustrating that i can't combine my saves from tablet/smartphone with the desktop version of the game.

I totally like the idea and would use this feature :)

User avatar
jack_norton
Lemma-Class Veteran
Posts: 4084
Joined: Mon Jul 21, 2008 5:41 pm
Completed: Too many! See my homepage
Projects: A lot! See www.winterwolves.com
Tumblr: winterwolvesgames
Contact:

Re: Dropbox Integration for Save File Synchronization

#3 Post by jack_norton »

Several of my users asked such a feature, so for sure if you do it, I would add it to my games :)
follow me on Image Image Image
computer games

LVUER
King of Lolies
Posts: 4538
Joined: Mon Nov 26, 2007 9:57 pm
Completed: R.S.P
Location: Bandung, West Java, Indonesia
Contact:

Re: Dropbox Integration for Save File Synchronization

#4 Post by LVUER »

If there is nothing negative to RenPy, yeah, why not? It would be a good feature for RenPy. BTW, Dropbox would allow us doing this, right? Using their service to save games?
"Double the princesses, quadruple the fun!" - Haken Browning (SRW-OG Endless Frontier)

DeviantArt Account
MoeToMecha Blog (under construction)
Lolicondria Blog (under construction) <- NSFW

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Dropbox Integration for Save File Synchronization

#5 Post by PyTom »

LVUER wrote:If there is nothing negative to RenPy, yeah, why not? It would be a good feature for RenPy. BTW, Dropbox would allow us doing this, right? Using their service to save games?
I'll have to submit it for approval, but I think they'll allow it.

The big question in my mind is if they'll allow us to use one app id for all Ren'Py games, or if each game will need to go through the dropbox approval process separately. I'd like to offer people the choice of enabling for a single game and enabling for all Ren'Py games - but that may or may not be possible.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Sslaxx
Regular
Posts: 52
Joined: Thu Jul 18, 2013 7:35 pm
Deviantart: sslaxx
Github: Sslaxx
Skype: Sslaxx
Location: Malvern, UK
Discord: Sslaxx#0159
Contact:

Re: Dropbox Integration for Save File Synchronization

#6 Post by Sslaxx »

Not talking a centralised location here, but a player's own Dropbox account?
Stuart "Sslaxx" Moore.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Dropbox Integration for Save File Synchronization

#7 Post by PyTom »

Sslaxx wrote:Not talking a centralised location here, but a player's own Dropbox account?
Yes.

More specifically, Dropbox has the idea of an "App Directory". So a Ren'Py game would have access to its save files, and those from other Ren'Py games, but not the other contents of your account.

I'd have no access to the saves at all, unless you chose to send them to me for some reason.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: Dropbox Integration for Save File Synchronization

#8 Post by Elmiwisa »

PyTom wrote: The big question in my mind is if they'll allow us to use one app id for all Ren'Py games, or if each game will need to go through the dropbox approval process separately. I'd like to offer people the choice of enabling for a single game and enabling for all Ren'Py games - but that may or may not be possible.
Eh...sorry for a technical concern here. :oops: But Ren'Py is open source right? And each game is a standalone isn't it? So each game that is made with Ren'Py, in theory, could have modified the engine to such a huge extend that they might be fundamentally different from how a Ren'Py is supposed to function, up to and including how file access work. So it just seem to me that, while more convenient, it just won't make sense for a single approval to be allowed for all Ren'Py games. :|

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Dropbox Integration for Save File Synchronization

#9 Post by PyTom »

That's an issue with all open-source things, though. There's nothing stopping someone from taking an approved game and modifying the code after it's been released.

This is really Dropbox's problem - the implementation looks pretty simple, so I'll probably just write the code and submit it to them, and see what they say. The worst they can say is "No", in which case I'm out a little bit of work. (Or I could move on to Google Drive or some other service.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Lishy
Miko-Class Veteran
Posts: 555
Joined: Mon Oct 18, 2010 9:14 pm
Contact:

Re: Dropbox Integration for Save File Synchronization

#10 Post by Lishy »

I'm against this idea simply because of reasons stated on IRC. It seems like it could be vulnerable, and I don't like the idea of affiliating RenPy with a cloud service.

If someone wants to back up their saves, there's nothing stopping them already. Why waste time with a completely new feature?
-

Spiky Caterpillar
Veteran
Posts: 253
Joined: Fri Nov 14, 2008 7:59 pm
Completed: Lots.
Projects: Black Closet
Organization: Slipshod
Location: Behind you.
Contact:

Re: Dropbox Integration for Save File Synchronization

#11 Post by Spiky Caterpillar »

A Ren'Py savegame can execute arbitrary code when loaded (which is why you should never load a save that someone else gave you outside a sandboxed account). Storing them on a central server would, at a minimum, give the server operator the ability to take over the (desktop, not dropbox or wherever!) account you're playing the games under by modifying your saves.

Savegame exchange requires hardening the load/save mechanism so that it can no longer execute arbitrary code. I'm working on a hardened load system for Black Closet, but it is currently nowhere near finished, and I expect it to be a lot more brittle than the insecure load currently used. (For example, my custom classes require a bunch of explicit hooks to sanitize the data being loaded). It's also a rather large undertaking, and I'm not at all confident that I'll be able to catch every single potential code-execution vulnerability.

While I'd consider adding optional online save/persistent data exchange to my games, I'm personally not comfortable depending on servers that I don't control myself - so even if I were implementing save sharing, I wouldn't use a Dropbox backend.
Nom nom nom nom nom LEAVES.

User avatar
netravelr
Miko-Class Veteran
Posts: 504
Joined: Thu Jan 28, 2010 2:31 am
Completed: Culina: Hands in the Kitchen, Culina: The Spirit of Cooking, Saving Zoey
Projects: Love at the Laundromat
Organization: Lakeview Interactive
Deviantart: netravelr
Location: USA
Contact:

Re: Dropbox Integration for Save File Synchronization

#12 Post by netravelr »

I'm all for it. It's completely optional, so if people are upset with it they don't have to use it. I know I'd use it for sure.
Image
Technical Designer/Programmer
Game Design Portfolio - Project updates on my Twitter
Experienced in: C/C++/C#, Python, Unreal, Unity, and Flash
_________________
"Space can be very lonely. The greatest adventure is having someone share it with you."

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Dropbox Integration for Save File Synchronization

#13 Post by PyTom »

I think Spiky is totally right about this. Since (maliciously created) Ren'Py save files can execute python code, we have a problem - if either the server or one of the user's computers gets compromised, the save sync system could compromise all of the computers in the synchronization group. I guess I could try to deal with this by warning the user - but if a user didn't understand the warning, and had their system compromised this way, I'd feel terrible.

I don't see any way to change the savefile format without making Ren'Py significantly less flexible. And so, I don't think we can have save-sync support, to dropbox or elsewhere.

I'd like to thank Spiky for a reasoned analysis that saved me from making a huge mistake.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Elmiwisa
Veteran
Posts: 476
Joined: Sun Jul 21, 2013 8:08 am
Contact:

Re: [Cancelled]Dropbox Integration for Save File Synchroniza

#14 Post by Elmiwisa »

Wait a minute... :?: I thought that everyone are already supposed to take precaution against malicious code for simply downloading a game from this forum at all, even if the games are made with Ren'Py? :? After all, Ren'Py is so flexible that it can be patched into anything, so pretty much any games downloaded from here, whether Ren'Py or not, should be considered to be a fully functional programme. There is nothing to prevent a game posted here from being compromised in advanced by say, a computer virus on the creator's computer, or perhaps because the creator is purposefully making a game that is a virus. :cry: And since everyone already took the precaution, the issue with the danger of save files is moot.
Perhaps in the future, maybe Ren'Py will be made more secure so that games made with Ren'Py is literally incapable of causing problem, then that automatically will handle any problems with the save files right?

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: [Cancelled]Dropbox Integration for Save File Synchroniza

#15 Post by PyTom »

Sure. And I think it's historically been reasonable to trust creators with a reputation. What's new here is that the save-sync system would turn Ren'Py into an infection vector. So with save-sync, you could have:

1) Computer A is compromised by a virus that infects Ren'Py save files.
2) Save-Sync moves the infected files over to computer B.
3) The user loads the save on computer B, and computer B becomes infected.

I go back and forth as to if this is a risk I could plausibly ask people to choose to accept.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users