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.

AppGameKit Classic Chat / Differences between Player and Player?

Author
Message
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 10th Sep 2013 07:12
Using the AppGameKit player, I can broadcast .gif images, load them, and use them with no problems at all.
But when I compile it into an APK, they come up with the default AppGameKit image-failed image (red cross on b/w check)
I've got AGKb15 installed, both the Player and the APKs are beta15. I've double checked the case and I can't figure it out!
I don't really want to convert them to Jpegs because they'll take up heaps more space (200 images).

Why can the player load them in broadcast mode, but not standalone mode?!??


info:

tier1
beta15
APKs built with Eclipse


The NEW, awesomest app on Google Play
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 10th Sep 2013 07:23 Edited at: 10th Sep 2013 07:24
Double check the capitalization of every image you are using. Android files are case sensitive so even though the app will compile and broadcast (and work fine when tested through the IDE etc) you'll get invalid errors when you compile the APK for Android. So, if the file is named "Background1.gif" and you reference it in AppGameKit code as "background1.gif" it will not be found.

Aside from that, make sure you've included all of the media files under assets > media in your Android project before building. If you are using subfolders, make sure the paths are correctly referenced by the AppGameKit code.
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 10th Sep 2013 07:41 Edited at: 10th Sep 2013 07:52
It's definitely got the right case.
and the files are definitely in the correct location in the APK

One possibility I just thought of, though, is because the strings aren't hard-coded. The file names are loaded from other files, which may have some sort of affect on it.

Here's my code:


EDIT: wow, turns out Jpgs are smaller! I'll use them. I assumed gifs would be because of the indexed colour


The NEW, awesomest app on Google Play
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 10th Sep 2013 09:18
alright, it works fine with Jpegs, so there's go to be some problem with loading of gifs stored on an APK.
:/
But as I don't know enough about it, I can't really report it...


The NEW, awesomest app on Google Play
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 10th Sep 2013 09:27
Why are you using GIF? It's no longer a massively supported format. You should use an 8-bit PNG instead. It's the same thing but works on all platforms. A 32-bit PNG gives you the highest quality with 8 bit for each channel, including alpha. JPG and PNG/GIF use different types of compressions and are better for different types of images. JPG are best for photo type images with loads of colors, they have no alpha channel though. PNG is generally best for images with fewer colors or when you need alpha.

easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 10th Sep 2013 12:22
I was using gif because the images didn't need heaps of colours.
But I didn't realise that JPG and PNG supported 8-bit colours.
I'm using JPGs now and they work fine.
PNG's probably best, I'll try them


The NEW, awesomest app on Google Play
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 10th Sep 2013 21:10
JPG doesn't support 8-bit. Only PNG does. And PNG have the same compression type as GIF. So it's the same as GIF but works on pretty much anything. Regarding JPG, programs like Photoshop can alter the compression/quality level.

Login to post a reply

Server time is: 2024-05-09 10:58:53
Your offset time is: 2024-05-09 10:58:53