App Crashes On Splash Screen

Discussion in 'Technical Discussion' started by daniel_house, Aug 24, 2016.

  1. daniel_house

    daniel_house Boxer

    Joined:
    Mar 26, 2016
    Messages:
    11
    Likes Received:
    2
    Hello everyone!

    So I exported my game through eclipse and made an APK. Then I downloaded it and now when I open it up on my HTC the game crashes at 98% on the loading screen/splash screen.

    Then the app closes itself and the phone comes up with a message saying 'Unfortunately, Tasks has stopped.'

    Can anyone help me? I folled this tutorial to generate my APK from eclipse:


    Everything seemed to go perfectly until it started to crash at 98%.

    Thanks for reading, any help would be much appreciated!
    Thanks Dan
     
  2. jcalle

    jcalle Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,155
    Likes Received:
    515
  3. roy

    roy Boxer

    Joined:
    Jul 23, 2016
    Messages:
    69
    Likes Received:
    27
    It could be memory issues. How big is your APK? How many atlasses do you have?

    If you connect your phone to your computer you can read the log in eclipse and probably find the reason why it's happening.
     
  4. daniel_house

    daniel_house Boxer

    Joined:
    Mar 26, 2016
    Messages:
    11
    Likes Received:
    2
    Ahhhh useful answers thank you! I'll try and check on another phone (not sure I have another android though), It had some errors in Eclipse however like the tutorial video they turned into 32 cautions (with the little yellow triangle, this was the same as what the tutorial man was getting). I might take you up on the Teamviewer help Jcalle, but I'll try all of what you and Roy have said first!

    Roy my APK file is 18.4MB (I'm not sure whether that is big or small, this is my first game). I currently have 54 atlases, I'll attach some screenshots but basically 1 to 5 atlases have loads of images on them and then 6 to 54 atlases only have one image each (they are a series of images that create an animation on the Main Menu screen)

    Thanks guys! Screenshot (123).png Screenshot (122).png Screenshot (121).png
     
  5. roy

    roy Boxer

    Joined:
    Jul 23, 2016
    Messages:
    69
    Likes Received:
    27
    Your APK size wasn't all bad. It was actually surprisingly small considering the amount of atlases.

    You want to reduce the image size for the animation on your main menu. If you do a search for atlases on the forum you'll see that people talk about having max 4 (or maybe a bit more) atlases.

    General it's good if you can avoid to scale images much. The best is when you are able to have them 1:1 and not scale at all.

    As for the warnings in eclipse you can most probably ignore them.
     
    Christoph likes this.
  6. daniel_house

    daniel_house Boxer

    Joined:
    Mar 26, 2016
    Messages:
    11
    Likes Received:
    2
    Ahhh okay, thank you Roy that's very helpful information. Why did the animation images all appear in separate atlases (unlike the other images, they are all PNGs). Just wondering how to reduce the amount of atlases without changing the look of the game.

    Also will leaving PNGs 1:1 rather than scaling them increase the size of the game? Why is it that it's good to avoid scaling?

    Thanks, that's a relief as I'm really not great with Eclipse!
     
  7. jcalle

    jcalle Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,155
    Likes Received:
    515
    @roy is right, the problem may be the large number of Atlasses.
    You have to always work in scale 1:1 and not repeat any image.
     
  8. daniel_house

    daniel_house Boxer

    Joined:
    Mar 26, 2016
    Messages:
    11
    Likes Received:
    2
    could you expand, or just explain why 1:1 works better? In Trey's tutorials you see him scaling objects all the time, surely if he's doing it you don't always have to?

    By repeating an image do you mean you can't use a single PNG more than once? That seems a bit backwards...

    Thanks for your reply @jcalle
     
  9. roy

    roy Boxer

    Joined:
    Jul 23, 2016
    Messages:
    69
    Likes Received:
    27
    Some scaling is fine. However, remember that different mobile devices have a different amount of available memory. You want your game to work everywhere every time with no lagging or crashes. The less scaling the more the greater chance to never fail.

    If you have images you use a lot they should ideally be imported to the game in the size you intend to use them.

    All the atlases are loaded into memory. All the scaling makes the device having to first read the image in question and then copying it in memory.

    Buildbox games are per now set to use 640x1136 pixels. Import all graphics so that it fits nicely for that resolution.
     
  10. daniel_house

    daniel_house Boxer

    Joined:
    Mar 26, 2016
    Messages:
    11
    Likes Received:
    2
    aaah very well explained thank you! It makes creating the games a much bigger task but if it doesn't crash then I guess it's worth it!
     

Share This Page