Online Save Failure

For some reason, my game is failing to save while playing with the online client. It does NOT fail while playing the downloaded version with the desktop client. Save files also load just fine with the desktop client.

The only error message I receive is:

Saving game...
Failed to save game.

What might be the issue? I saw suggestions that it might be a missing bracket in some other threads, but how would I find that? I've been looking through every object and have yet to find an instance, though I could have missed it.

EDIT: My save files are about 3.25 MB. Might they be too big for the online client to handle? My game does lag a lot while trying to play it online too.


Does your game have a lot of text in the output area, leading to the large filesize?

If there is a problem in the game file which stops it saying, the message will be "Failed to save game: " + result.Reason + "<br/>". If the Quest backend doesn't supply a reason, it would appear as Failed to save game: .

Without the colon, that indicates a HTTP error rather than a Quest error. Most likely, the request has timed out or your connection to the server was interrupted. It isn't the most stable at the best of times, so it's entirely possible that the amount of text in your output (which the browser has to send back to the server before saving) is taking too long and causing the save to time out.

You could try including an option to clear the screen at some point and disable saveClearedText, to see if this makes a difference.


I clear the screen every time the player enters a new room, and each room doesn't have a whole lot of text until you interact with things. I've also tried saving the game right at the start and get the same result.

Where would I disable saveClearedText?


Where would I disable saveClearedText?

I believe the relevant line is:

JS.eval("saveClearedText = false;")

Without this, clearing the screen hides the text currently displayed, but doesn't remove it, so it will all still be sent back to the server when you attempt to save.


I tried pasting this line into the start script section of the game object's Scripts tab, but I'm still getting the save error. Is this the right spot to place it or does it need to go somewhere else?


It should work in the start script; but then it wouldn't take effect when reloading a saved game.
(If it worked, you'd need to move it to the 'UI Initialisation script' on the 'Advanced Scripts' tab - this is the case for most code that starts with JS.)

If you can't save once, then I'd guess it isn't helping.
I'm not sure if the online player has a limit to the size of the save file; I've only looked at the code for Quest itself, not the website.
If you have a save file you could share, that might make it easier to see if there are any other problems, or if there's anything that could be made more efficient to reduce its size.


My save file is around 3.3MB. I did recently add some music to the game. Will I have to remove that for the online version?


I don't think resources are included in the save file, but not sure.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums