bilgincoskun / brogue-android-port

Brogue Android Port
GNU Affero General Public License v3.0
63 stars 3 forks source link

Minimizing the App Causes Current Game to Exit without Saving #9

Closed joeljpa closed 4 years ago

joeljpa commented 4 years ago

I know it's probably more to do with Brogue's original inability to save the game quickly, so then posting this as a PSA. I've played many ports of the main RLs and have this habit of Save+Quitting rather before putting the app in the background. In Brogue, it's more of a chore but yea.

I happen to forget to manually save today and the app went in the background. Got some call, usually putting this app back again let's me continue. Android seems to only kill it when it deems it necessary and that seems to happen only after a while or you've opened many other apps since then. This time I got really unlucky, not only did it kill it immediately after opening another app...my character happened to be my highest score :X

bilgincoskun commented 4 years ago

Just to be sure which version are you playing? Also the game autosaves occasionally so you might still have the save of the killed game. If not,is your save completely disappeared from Open Game Menu or when you tried to open it was it corrupt?

If your autosave is missing or corrupt, I am not sure how to tackle this. I can trigger a save when app goes background but with aggresive power saving settings like in this instance the game may delete the correct autosave file and replace it with a corrupt save so it may do more harm than good. In the meantime only solution I can suggest right now is (although I know most of the vendors do not respect it) adding an exception to the powersaving settings for Brogue.

joeljpa commented 4 years ago

I'm using lv0.12.2 your vanilla one (not CE or the other). Oh yea, I forgot it does autosave but no, my save game just vanished from the Open game menu. That is strange then.

I'll do that power saving exception. Thanks for your help!

joeljpa commented 4 years ago

Dang it. Now another issue which never happened before losing this first game. My new saved games now sometimes get "unloadable". I try to load and get the Brogue error that it's just a recorded game now. Playing the recorded game ahead too doesn't work saying "out-of-sync". I'll try reinstalling.

joeljpa commented 4 years ago

Okay false alarm mostly. Reinstalling and copying the highscore/recording list and now it works as before. I've tried killing the newly-installed app manually and found that it did autosave at each level descend. I don't know how did the first issue happen but a good clue is my highscore lists it as a "quit", probably a mistouch or something. Thanks.

You can close this issue unless you feel there's some potential in your idea of implementing an autosave feature in future.

bilgincoskun commented 4 years ago

Ok, I am glad vanishing games without any save files are not the problem. That said Brogue save system really have its issues. It seems Brogue CE is trying to fix these issues, so you can try that also. Like I said before autosave feature might have unwanted side-effects so I think I won't implemented unless there is a necessity for it.