Game crashes on device (iPad)

Discussion in 'Technical Discussion' started by jermaine150, Nov 19, 2015.

  1. jermaine150

    jermaine150 Boxer

    Joined:
    Nov 10, 2015
    Messages:
    8
    Likes Received:
    2
    I'm fairly new to Buildbox and currently working on my first game for iOS.
    When i run the game in preview mode it runs like it should. When I export and run from XCode the game runs fine on the simulator and on my iPhone.
    However, when i start the game on my iPad it starts, shows the loading screen and then just stops. No crash information in XCode, Xcode just detects that my iPad is disconnect (which isn't the case).

    Does anyone have an idea on where te look? I'm kind of lost because the app does run on the iPad simulator and on my iPhone.
     
    DaveMalt likes this.
  2. darren

    darren Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    134
    Likes Received:
    58
    what model iPhone / iPad? No crash information? could it be a "jetsam [date/time].crash" which is low memory...one device probably has more memory. if crashing at start, then perhaps too many atlases...how many do you have?
     
  3. jermaine150

    jermaine150 Boxer

    Joined:
    Nov 10, 2015
    Messages:
    8
    Likes Received:
    2
    On iPhone 6s the application runs smooth. On a physical iPad 2 it crashes, or better said doesn't even start. In XCode is see the files loading in the output window and Xcode just stops with the message: Re-connect your device. On the iPad it shows the loading screen and just quits.

    I've tried different iPad simulators and all work.

    Unfortunately i'm very new to Buildbox and game development so I hope i understand your question correctly: In the Resources\data\atlases folder I count 17 atlases. (for every atlas a .plist and .png file)

    Thanks!
     
  4. mobile_gamegraphics

    mobile_gamegraphics Boxer

    Joined:
    Oct 12, 2015
    Messages:
    86
    Likes Received:
    29
    I can only add that I have the exact same situation and issue. Ipad2 - Xcode run on ipad crashes.
     
  5. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    17 atlases is way too many for lower power devices... you need to get it down to at least 4-5 if not lower. There are many tricks to optimizing atlases. Don't drop images that you need to scale down in Buildbox, scale before dropping. Don't add duplicate images. Images of solid color can be reduced before dropping in Buildbox and then scaled up.
     
    jermaine150 and Newee like this.
  6. jermaine150

    jermaine150 Boxer

    Joined:
    Nov 10, 2015
    Messages:
    8
    Likes Received:
    2
    Correct, when the atlas loading starts the used memory increases from 25MB to over 500MB!!

    Right now i have an existing game that i'm trying to tweak and modify in order to learn BuildBox and game development. The 17 atlases were already there, what is the best way to get them smaller or remove a few?

    I also see a lot of duplicate images in multiple atlases when i view them in BuildBox. Right now i don't have a good understanding of how the atlases link to the images in the scenes. I'll look around for some tutorials on this, if you know a good one please let me know!
     
  7. jermaine150

    jermaine150 Boxer

    Joined:
    Nov 10, 2015
    Messages:
    8
    Likes Received:
    2
    It turns out the images in the BuildbBox project were all really large. A specific image would be around 900x900 and was scaled within the app to only 10% of the size. These large images also ended up in my atlases which caused the number of atlases to blow up. What I did was, like Andy mentioned, scale the images to the right size before adding them to BuildBox.

    Eventually i ended up with only 4 atlases instead of the initial 14 and the app now runs fine on the iPad
     
    mobile_gamegraphics likes this.

Share This Page