Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Handling Application Interruptions

Author
Message
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 6th Jan 2012 11:33 Edited at: 6th Jan 2012 11:41
I would like an update please on this issue - how AppGameKit Tier1 peeps can see whether or not the application is currently in focus. There is already an issue posted at http://code.google.com/p/agk/issues/detail?id=96, but I wanted to get a response from here on the forum.

What I read in other posts is that this might be too needlessly complicated for Tier1, but I wholeheartedly disagree. All that is needed is a Getter value that returns a 0 or 1 if the application was interrupted. Check the getter each frame, and if it returns 0, do XXX, if it returns 1, do YYY.

For example:



Just like MousePressed or MouseReleased. The variable returns a value of 1 for a single frame only, and returns to 0 afterwards.

EDIT: I believe that this should be a feature included in the next release in AGK. It is that important - nowadays, when a game is interrupted by external forces (phonecall on a phone, dead batteries in a Wii/PS3/360 controller) the game MUST go to pause mode. Not having this feature is... ludicrous.

EDIT2: I'm not trying to come off as completely angry. My app development has been smooth sailing so far, but I feel like I can't ship an app (especially with mine that is so timer-based) where the user will be caught off guard if the clock starts ticking again once the app resumes.

Hi there. My name is Dug. I have just met you, and I love you.
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 6th Jan 2012 13:30
The designed behaviour of AppGameKit apps is to automatically pause when the app is interrupted, so all sprite animations, particles, timings, e.t.c are frozen until control is passed back to the app. Have your experiences with certain devices demonstrated otherwise? If so, this might be a bug in AGK.

I drink tea, and in my spare time I write software.
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 6th Jan 2012 14:06
What he is asking for is to be able to check if the app was interrupted. If so, he want the user to return to the app in a different state than before it was interrupted.

In this case he wants to create a pause feature so that when the user returns to the app it must then be resumed by the user. Similar to say you need to change the batteries on a controller the game you are playing switches to a pause menu and you manually resume the game when you are ready.

anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 6th Jan 2012 14:56 Edited at: 6th Jan 2012 14:57
Thanks, Digital Awakening! That is exactly what I want. For example, this is how Microsoft says XNA Indie Developers need to do for a disconnected controller:



Source: http://msdn.microsoft.com/en-us/library/bb203901.aspx

This is similar to what I'd like to do with my app, for example. I would like to have the ability to put up a 'pause screen' in my application when need be, based on application interruptions.

I understand that AppGameKit suspends and resumes application playback automatically, but that doesn't mean the end-user is ready for the application to resume when AppGameKit is. Having a pause screen show up when the user resumes the application is just being courteous.

Hi there. My name is Dug. I have just met you, and I love you.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jan 2012 16:07 Edited at: 6th Jan 2012 16:07
yes AppGameKit needs to have some CURRENT_STATE command
sparkart
13
Years of Service
User Offline
Joined: 2nd Nov 2011
Location:
Posted: 8th Jan 2012 09:26
Speaking of which, is it possible to override that behavior? This would usually be useful for, say an application that involves networking.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Jan 2012 18:01
This will be included in future as GetResumed() which will return 1 when you app has been reactivated from being in the background. Whilst in the background your app will automatically pause so it is just a case of showing the pause screen when it reactivates to allow the user some time before restarting play.
anwserman
13
Years of Service
User Offline
Joined: 20th May 2011
Location: Wisconsin
Posted: 10th Jan 2012 18:19 Edited at: 10th Jan 2012 18:19
Quote: "This will be included in future as GetResumed() which will return 1 when you app has been reactivated from being in the background. Whilst in the background your app will automatically pause so it is just a case of showing the pause screen when it reactivates to allow the user some time before restarting play. "


If I could I would give you a hug right now!!!!!!!!!!!!!!! YAY!!!!!!!!!!!!! Thank you!

Hi there. My name is Dug. I have just met you, and I love you.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 10th Jan 2012 20:49
GetResumed
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Jan 2012 16:07
This is Good News

Do we know if the Timer() will pause, or always be relative to the time that the app started?

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 13th Jan 2012 21:21
Timer() will not pause
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Jan 2012 23:08
Do you know that, or are you speculating?

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 14th Jan 2012 19:01
Just tested on Windows, Timer() keeps on increasing when you minimise the app. I have to test on iOS.

I must have confused the command with GetFrameTime()!!!

Login to post a reply

Server time is: 2024-11-22 23:57:35
Your offset time is: 2024-11-22 23:57:35