User Tag List

Results 1 to 9 of 9

Thread: Detect game closed/reopened - for multi-tasking

  1. #1
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Detect game closed/reopened - for multi-tasking

    I would like to detect if an iOS app has been exited with the home button and I would also like to be able to detect when the player returns to the application (when multi-tasking is enabled for this app).

    This would be useful for many reasons. One example is for an action game: When you press the home button it quits... then when you return to the game via the multi-tasking-bar or icon, the game doesn't immediately start, but it can be paused until the player clicks a button to start.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    I think I just worked out a way to do this but I haven't tested it. You could use an INI object and when the game starts set "GameStarted=1". Then when you finish a game (player dies or wins, etc) you set "GameStarted=0". Then at the start of the application if "GameStarted=0" you know that the game was quit mid-game and you can load a game from the appropriate position.

    Native support would be good, but I think that's a neat workaround.


  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jan 2009
    Posts
    1,052
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    > Then at the start of the application if "GameStarted=0" you know that the game was quit mid-game and you can load a game from the appropriate position.

    The question is, if you set your app to run in the background, when you get back to it after the user left for a while, will it be considered "start of application" in MMF?

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    It won't be - I forgot to mention I was assuming you're using Multitasking set to off. So it's not a perfect work around, but for simplistic games it will work. (Resume the last level they were on, but not the complete "state" of the level).

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jan 2009
    Posts
    1,052
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    Then I add +1 for the events "On HomeButton Pressed" and "On Game Resumed" for multitasking-enabled games. Those will allow us to pause/resume games where needed.

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    The application is already, and automatically put into pause when quitting the active state, and resumed when coming back. No need to do it yourself.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    Francois did you read why I thought this would be useful?

    Imagine the situation where you're playing a very fast paced racing game and you're about to hit a wall. You click the home button because you need to pause it temporarily to get up and walk somewhere (or someone calls you), and then when you resume the game using no detection of the application being resumed, and you immediate crash into a wall because you had no time to react.

    Now imagine the scenario with pause detection: When you come back to the game it says "Tap anywhere to continue". The player can see that they are about to crash into a wall and takes a few seconds to work out what they're going to do next before resuming the game by tapping the screen.

  8. #8
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    It would be a useful feature to have if possible to do.
    Andy H @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Detect game closed/reopened - for multi-tasking

    Ha OK, I did not understand it correctly.
    I'll see what I can do.

Similar Threads

  1. some questions like...how detect a pause game ?
    By arthurh in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 28th October 2013, 08:23 AM
  2. Detect when no more moves in Advanced Game Board
    By Keith in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st August 2011, 09:34 PM
  3. Multi-level game (need advice)
    By JohnC in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 21st November 2006, 10:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •