Browser Renpy, Persistent Saving?

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
User avatar
xiruo
Newbie
Posts: 10
Joined: Wed Nov 30, 2022 7:14 am
itch: no-xiruo
Contact:

Browser Renpy, Persistent Saving?

#1 Post by xiruo »

Hello! I'm thinking about making a browser game using Renpy and then using itch.io to host it.

The issue is, when hosting games on itch or using the incognito browser to test running it locally, whenever a user saves the game, that save doesn't stay after a refresh of the page.
The process being:
- play game
- save game in a slot
- refresh page
- try to load the save slot, only to see it missing

The only instance where this DOESN'T happen is if I am running the game locally on my browser (not incognito).

I tried some Renpy games on itch.io that have play in browser versions, and it seems to be a permission error?
Whenever I try saving a browser Renpy game on itch.io it says "write error: user denied permission access to the database".
Image

So it seems like when in incognito or using a site like itch.io to host the browser game, there's no way for them to save it into the game's save files. (How renpy would do if the user downloads the game.) And thus the save file doesn't persist after a refresh of the browser.

Is there anyway to counter act this? I want a player to be able to play in browser, save their game, leave that page and then come back and load their game back up again. (Without having to download their save files and everything.)

I'm guessing there would need to be some kind of... player database connected to the browser game in order to allow it to store saves for every player. But I have no idea how to do that... or if that's even within the scope of Renpy.

Please let me know, thank you!
ᕕ( ᐛ )ᕗ ᕕ( ᐕ )ᕗ

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3809
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Browser Renpy, Persistent Saving?

#2 Post by Imperf3kt »

This is specifically what incognito mode is for, it doesn't save any session data or cookies at all, that includes saved games.
I don't think there's a way around this, you're trying to do something that is designed specifically not to do what your trying to do.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

trailsiderice
Regular
Posts: 69
Joined: Fri Sep 29, 2023 4:02 pm
Contact:

Re: Browser Renpy, Persistent Saving?

#3 Post by trailsiderice »

What Imperf3kt said. The purpose of incognito mode is to avoid saving session data.

Anyone playing the game in incognito mode is kind of asking to lose their saves. I'm not really sure why you wouldn't just play it in a normal tab.

User avatar
PyTom
Ren'Py Creator
Posts: 16097
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: Browser Renpy, Persistent Saving?

#4 Post by PyTom »

Note that it should work with itch.io normally, but as said above, the point of incognito mode is that everything is removed when the session ends. (Unless the user downloads the saves.)
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

GeraldineRushing
Newbie
Posts: 3
Joined: Mon Oct 30, 2023 4:28 am

Re: Browser Renpy, Persistent Saving?

#5 Post by GeraldineRushing »

To address persistent save issues in browser-hosted Ren'Py games, consider implementing a server-side solution for player data storage, such as a database. This can allow users to save and retrieve game progress across sessions. Integrating a player database might require additional web development alongside Ren'Py.

User avatar
xiruo
Newbie
Posts: 10
Joined: Wed Nov 30, 2022 7:14 am
itch: no-xiruo
Contact:

Re: Browser Renpy, Persistent Saving?

#6 Post by xiruo »

Sorry, I honestly forgot I posted this. But I think my wording must have confused you.

I wasn't talking about only incognito mode, I said that "it seems like when in incognito or using a site like itch.io to host the browser game, there's no way for them to save it into the game's save files"-- which is really hard to read. Apologies again.

But basically, it happened when I was playing on a browser regularly. (Not in incognito.)
Though after the talk about incognito, I realized that the browser I was using was Brave. Which has built in stuff that will block a bunch of crap. And I'm guessing that it just blocked that save file.

I tried it again on Edge, and the save worked fine.

Sorry to throw you in a loop there, but I'm glad that it's sorted out now. Thank you!!
ᕕ( ᐛ )ᕗ ᕕ( ᐕ )ᕗ

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]