Games closes when multitasking

Discussion in 'iOS Programming' started by CutControl, Oct 17, 2011.

  1. CutControl macrumors newbie

    Joined:
    Oct 17, 2011
    #1
    Hello. I have this problem:

    I made a game for the iPad with ~110mb RAM footprint.
    • I launch the game
    • Switch into another application, say safari with tabs opened or a different game
    • Switch back to my game
    • The game restart as if just first started it

    My guess: IOS runs out of ram and forces my game to close in the background.

    Question: Is there something that can be done about it? Any help is greatly appreciated. :(

    ps I tried google, but couldnt get the right key words
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Save the state, but remove the used resources, and force a PAUSED screen on it when you come back, and load the sources back in when they press resume, just a wild guess..
     
  3. CutControl thread starter macrumors newbie

    Joined:
    Oct 17, 2011
    #3
    Not a bad idea. I will consider that for a future project. TYVM :)
    But this one has to be released real soon.
    I was mostly wondering if this is normal for ios or not.
    Tried Cut the Rope and some others and found that they can be unloaded like this too. So I guess I'll have to leave like this and work on ram footprint.
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    I think you're better off putting your efforts into saving the state of your app.
     
  5. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #5
    I absolutely agree. Unless an apps RAM footprint is zero bytes iOS might remove it from memory.
     
  6. CutControl thread starter macrumors newbie

    Joined:
    Oct 17, 2011
    #6
    Well yeah, that too :)
    Thanks guys. Somehow I never thought of save states.
     

Share This Page