Page 1 of 1

autosave on forced exit

Posted: Tue Nov 05, 2013 12:24 am
by supermario
After playing for a while, I'll get a phone call or email and switch to another view.
Before I know it, I'll have done ten other things and when I come back to DraStic, it's been closed by android.
I can restore from a save state or a savegame, but autosave doesn't seem to happen when android kills the emulator (due to memory use, presumably).

Autosave is checked.

Is DraStic supposed to autosave when the process is exited for reasons other than clicking "exit" or "close DraStic"? If not, this would be a killer feature to have (of course it's already incredible!)

Re: autosave on forced exit

Posted: Tue Nov 05, 2013 2:41 am
by Jay Haru
supermario wrote:After playing for a while, I'll get a phone call or email and switch to another view.
Before I know it, I'll have done ten other things and when I come back to DraStic, it's been closed by android.
I can restore from a save state or a savegame, but autosave doesn't seem to happen when android kills the emulator (due to memory use, presumably).

Autosave is checked.

Is DraStic supposed to autosave when the process is exited for reasons other than clicking "exit" or "close DraStic"? If not, this would be a killer feature to have (of course it's already incredible!)
i am not sure its possible unless there is a way an app can now its switched from foreground to background status. also, saving before doing something else seems appropriate.

Re: autosave on forced exit

Posted: Tue Nov 05, 2013 7:59 am
by supermario
Apps can know this: http://developer.android.com/reference/ ... ause%28%29 Android's Activity.onPause() is built for precisely this purpose.

I agree the ideal workflow is to save state, but it really sucks when something urgent comes in and you lose your save...

Re: autosave on forced exit

Posted: Tue Nov 05, 2013 8:28 am
by Lordus
At the moment it only auto-saves, when you manually exit, but i see no problem including an option to auto-save on suspension.

Did you let DraStic create a shortcut when you started it the first time, and are trying to resume from that? If so, could you try if it resumes correctly, if you resume from the shortcut in the app drawer instead?

Re: autosave on forced exit

Posted: Tue Nov 05, 2013 1:26 pm
by dnyce13
This would be an awesome feature. This happens quite frequently when I get a phone call then I text someone while on the phone or check something on the phone to then forget drastic is open and due to insufficient memory it force closes.

Re: autosave on forced exit

Posted: Tue Nov 05, 2013 10:43 pm
by supermario
I did a bunch of experiments today and it happens no matter how I re-open the app. Via "recently opened", via the shortcut or the app drawer.
Many times I can resume fine, but given enough other apps (presumably enough memory pressure to kick DraStic out of memory), and I lose state and need to touch "continue" (and then reload from the savegame or save state).

Thanks.

Re: autosave on forced exit

Posted: Fri Nov 08, 2013 6:00 pm
by awk
That is essentially the idea behind having a Service and a notification in the app when it's running, like the oid emulators. One thing I've noticed as well is that I'm using swipepad to switch apps for impromptu messaging and when I try to go back to where I was, weird stuff happens: I have to launch the app through the icon in the drawer to carry on playing, but instead it launches a new instance of the app with the start screen, that I have to exit and brings back the one I put in the background. And that works even if I hadn't saved before switching. It's particularly clunky. Ideally it would be great if when the game starts, a static notification appears which retains the state of the game any time onpause is called. So when multitasking, you can just go back to your notification to jump back right where you stopped.

Something else a bit related (activity lifecycle and all that) is on xperia play, when sliding out the game pad the game freezes for a second. I assume it's because the gamepad forces a landscape orientation on the device and drastic picks up on it and updates even if it's already in landscape, but other emulators don't notice at all so maybe that could be improved!