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.

Android / Longer than average AGK program load times for Android

Author
Message
Vetie
11
Years of Service
User Offline
Joined: 2nd Sep 2012
Location:
Posted: 5th Sep 2012 04:56
Hello everyone,

I have been trying a few of the android games that have been released to the Google play store and have noticed that all of them take on average 4-5 seconds to load the main menu of the game once the icon has been tapped. All of my other games (not AGK)load to the main menu within 1.5 seconds.

To make sure my device wasn't causing the long load times, I reset my device, I have plenty of free ram (1.6GB), plenty of free space (12GB) and the Samsung Galaxy s3 w/2gb of ram. The long load times for AppGameKit programs continued.

My thought is that these programs are Tier1 and that extra load time is the AppGameKit player interpreting the code.

I know that inefficient coding causes this as well. If a program is coded to the Tier2 level, are the load times reduced?

Can anyone point me to a Tier2 coded app that has been put into the google play store?

Im still evaluating this program and am trying to get as much information as possible.
Thanks

Vetie
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 5th Sep 2012 14:36
My tier 1 app takes 2 seconds to start on my Galaxy S2. I have created an apk file.

Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Sep 2012 18:15
Long load time is what's keeping me from releasing my MIXMIX game on android. It take almost 3 minutes to load on my Kindle Fire and much longer on my Android phone.

Of course my game uses a lot of data, which has to be unpacked from the apk file.

But also, AppGameKit for Android has trouble creating the AGK/projectname folder. It creates an AGK/UNKNOWN folder on the SD card, but that doesn't help.

MarcoBruti
12
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 11th Sep 2012 15:33
what do you mean for AppGameKit for Android? Is it the beta player on the market? Have you not compiled your own?
Generally on Android there is:
- a initializing time where everything is black.
- then you load the media and you can show some splash screen. I use an animated sprite or fixed sprite, show just before loading media.
- then app start.
Do you load a lot of data from file? How big are your files?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 14th Sep 2012 01:08
if you are loading ALL data at the start, it's no wonder your app takes 3 mins.

you just have to load 1 basic graphic and sync it, to show the user some activity. that should only take 2-4 secs. then start loading the rest of the day, and maybe display some kind of loading test or moving graphic
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 14th Sep 2012 09:31
@ Marco and bj - I've detailed this in another thread, but here's the gist of the matter...

My MIXMIX game uses a large dictionary of words.

They ALL have to be available at the start of the game, so I can't "load as needed."

When I broadcast the game to any of my devices (iPad, iPod Touch, Kindle Fire, Android phone) the files are transferred during the broadcast, and are immediatly available to the program when it starts. Load time is under 3 seconds for ALL the data and graphics.

When I compile for iOS, load times for the iPad are still good, but the Touch takes much longer. And both Android devices take a REALLY long time to load.

For Android, I suspect the long load time is because the data has to be unpacked from the apk file every time the program runs.

I can mitigate this somewhat by saving the data to the device after it loads, that still means that the very first time the game runs, it takes a really long time to load. But the unpacking of the apk still takes a long time, even after the files have been "re-saved" to the device.

I've tried using the AppGameKit zip commands, but they just hang up the Android devices.

Part of the problem may be that, on the Android devices, AppGameKit does not create an AGK/MIXMIX/media folder, but instead creates an AGK/UNKNOWN/media folder. I believe this is a bug, and it has been reported on the Google bug reports page.

MarcoBruti
12
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 15th Sep 2012 18:53
I checked with my MrOttoBeat game, moved to SD, and I verified that the UNKNOWN folder on the SD contains the additional levels (.txt file) and media (.PNG) loaded from the Internet. These are the additional levels and bosses that the game downloads at startup.
The internal levels and media (i.e. the ones contained in the APK), I suppose that are unpacked and stored in that dir, as you suggested, but I cannot verify since as soon as I connect the phone to the PC with the USB, the applications on the SD stops working, and I suppose that all the files are removed from that directory.

If your Android devices have not my limitation, could you verify if ALL media files of the application (including the one packed into the APK) are ALL stored in that directory, or that directory is only used as write directory? I have some doubts, since if I start two applications made with AppGameKit, all two media folders would be stored into UNKNOWN?

Attached there is the contents of my UNKNOWN folder - don't worry, the teddy bear is a boss of my game

Attachments

Login to view attachments
Auger
12
Years of Service
User Offline
Joined: 21st Aug 2011
Location: Out There
Posted: 5th Oct 2012 07:23
Thanks Rich,

I was pulling my hair out last night about why my word game loads it's dictionary on my PC in about half a second but takes over 3 mins on my Android phone.

I put in some code to write the file out to my phone and now the dictionary loads in less then 2 seconds. The dictionary is about 1/2 a meg in size

Now the only problem will be the long load time on the initial start of the game while the file is unpacked and rewritten.



Auger
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Oct 2012 16:23
Auger, assuming you have some sort of display up while the game is loading, you might want to add a comment on it that says it will take a long time the first time it loads. You might even use a flag-like file (one that gets created after the initial load) to put up a separate startup screen for the first run.

Cheers,
Ancient Lady
AGK Community Tester
Auger
12
Years of Service
User Offline
Joined: 21st Aug 2011
Location: Out There
Posted: 5th Oct 2012 17:51
Yeah I was thinking of just adding a screen that states the dictionary would have to be unpacked the first time the program is run

Auger
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 5th Oct 2012 18:05
You might also want to add a comment in the App stores that you sell it in that the initial run will take longer to set things up, but all subsequent runs will be faster. That would inform the purchaser ahead of time and they would be ready for the initial loading display and delay.

A little thing like that might make a big impression and hopefully prompt good feelings with your potential customers.

Cheers,
Ancient Lady
AGK Community Tester
Auger
12
Years of Service
User Offline
Joined: 21st Aug 2011
Location: Out There
Posted: 5th Oct 2012 20:04
Good idea Lady , I'll make sure I do that . Thanks

Auger
minh nhu
11
Years of Service
User Offline
Joined: 10th Oct 2012
Location:
Posted: 10th Oct 2012 19:59
Thank rich, you infomation so helpful

[url="http://timvieclam.freevnn.com"]viec lam cho sinh vien[/url] | [url="http://giaythethaonam.webdoanhnghiep.org"]giay the thao nam[/url]

Login to post a reply

Server time is: 2024-05-03 10:30:37
Your offset time is: 2024-05-03 10:30:37