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 app interruptions

Author
Message
Techdojo
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: United Kingdom
Posted: 7th Sep 2011 16:09
I was wondering - what support does AppGameKit have for being "interrupted" especially when running on mobile devices (ie, pressing "Home" on iOS devices or getting a call on an phone).

Also is AppGameKit enabled for "multitasking" or background suspension when fast-app switching is used on iOS4+

App enthusiast and all round casual indie!
Davee
12
Years of Service
User Offline
Joined: 6th Sep 2011
Location: North West of England
Posted: 9th Sep 2011 00:01
Quote: "I was wondering - what support does AppGameKit have for being "interrupted" especially when running on mobile devices (ie, pressing "Home" on iOS devices or getting a call on an phone)."

These are good question, very interested in the response.

Of all the things I've lost, it's my... my... oh darn it.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 9th Sep 2011 08:09
While I'm running a program through the player on my iPad, pressing the home button pauses the program, and when I go back to it, it starts running again. Same thing when I flip the cover on it, it's paused until I open the cover up again.

Hmmmm, I'm not sure it's REALLY paused, I guess I'll make a clock display and try it.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Sep 2011 09:18
yes it's paused
Techdojo
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: United Kingdom
Posted: 9th Sep 2011 10:52
But is there some kind of notification event so you can know when your app is exited on the IOS player so you can save state etc?

App enthusiast and all round casual indie!
MobileCreator
12
Years of Service
User Offline
Joined: 1st Jun 2011
Location: Ottawa - Canada
Posted: 9th Sep 2011 15:58
Mobile devices usually have some kind of notification to tell the application that it is going to background, or it is going to be closed, battery low, etc...

I'm also interested on that. For example, a good game behaviour is not only pausing when going to background, but also show the "Pause Screen", so the user is not take on surprise when the game goes back active.

I believe these kind of events are pretty much the same on all mobile devices, with different implementations, of course.

Cheers

----------
Paulo
http://www.mobilecreators.com
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 11th Sep 2011 00:17
If someone can recreate a situation with the current version which loses game states during a phone call / pause event / etc then please post it to the issues board so we can reproduce it and deal: http://code.google.com/p/agk/issues/list

I drink tea, and in my spare time I write software.
Techdojo
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: United Kingdom
Posted: 11th Sep 2011 01:22
its not about loosing data rather about being told *when* the interruptions happen so data / states can be saved etc.

Regardless of the pause behaviour it'd be nice to know when someone actually exits your app

App enthusiast and all round casual indie!
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 11th Sep 2011 03:54
The idea is that AppGameKit 'freezes' the state of your entire app when the device goes elsewhere, so there is no need for your app to handle this (making it easier for everyone). Currently there is no built in way to detect the exit trigger in T1 and T2, but you can add this with a little knowledge to the T2 side of things. There is no mechanism for a callback in T1, so being able to run code the moment the app is terminated is not possible (though I can see the need for this). Ideas welcome, but remember this is BASIC not C++, so concepts such as callbacks or interupts go beyond the simple sequential nature of T1.

I drink tea, and in my spare time I write software.
Techdojo
12
Years of Service
User Offline
Joined: 7th Sep 2011
Location: United Kingdom
Posted: 12th Sep 2011 13:04
Ah I see - thanks for the info.

App enthusiast and all round casual indie!
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 12th Sep 2011 18:49
Lee,
Any extra control that we can be given in T1 is very much welcomed. The thing about having it so we can detect if say the application goes to a paused state that when the application is resumed we can prepare the player to continue playing. Ether popping up a menu or doing a count down.
This is a feature request that is very much needed.
Spacebuddy
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 12th Sep 2011 19:16
You should be able to do this two ways using Tier2 in Xcode.

You can capture notifications by adding -applicationDidEnterBackground: method in your application delegate or by registering for the UIApplicationDidEnterBackgroundNotification in your view controllers.

I have not tested this, but it should work.
Impetus73
12
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 12th Sep 2011 23:26
What about phones with multitasking capabilities? what happens when another application gets in the front, and your game app is in the background?

----------------
AGK user - novice
Did Amiga / AMOS programming in the 90's, just started programming again with AGK.

Login to post a reply

Server time is: 2024-04-24 23:48:52
Your offset time is: 2024-04-24 23:48:52