autosave on forced exit

Ask questions about DraStic or discuss compatibility issues here.
Post Reply
supermario
Posts:3
Joined:Tue Nov 05, 2013 12:15 am
autosave on forced exit

Post by supermario » Tue Nov 05, 2013 12:24 am

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!)

Jay Haru
Posts:1796
Joined:Sat Aug 10, 2013 1:10 pm
Location:Pasig, Philippines

Re: autosave on forced exit

Post by Jay Haru » Tue Nov 05, 2013 2:41 am

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.
Behold my mighty
Image

supermario
Posts:3
Joined:Tue Nov 05, 2013 12:15 am

Re: autosave on forced exit

Post by supermario » Tue Nov 05, 2013 7:59 am

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...

Lordus
Posts:517
Joined:Mon Aug 05, 2013 9:05 pm

Re: autosave on forced exit

Post by Lordus » Tue Nov 05, 2013 8:28 am

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?

dnyce13
Posts:99
Joined:Mon Aug 12, 2013 3:17 pm

Re: autosave on forced exit

Post by dnyce13 » Tue Nov 05, 2013 1:26 pm

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.

supermario
Posts:3
Joined:Tue Nov 05, 2013 12:15 am

Re: autosave on forced exit

Post by supermario » Tue Nov 05, 2013 10:43 pm

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.

awk
Posts:93
Joined:Thu Aug 08, 2013 9:50 am

Re: autosave on forced exit

Post by awk » Fri Nov 08, 2013 6:00 pm

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!

Post Reply