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 / AGK 1085 beta to AGK player 1085 beta broadcast - images fail to load and other complaints

Author
Message
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 1st Jan 2013 03:50
I'm just diving in to learning AGK. I've used DBPro for a while so and I've been comfortable with the minor changes in syntax and such.
I'm walking through the Hands on AppGameKit book and running into issues left and right.
First issue was that the splash screen (AGKSplash.png) doesn't work. After some digging I found out that the feature has been removed. Annoying, but no problem, I'd rather have more control.

Issue #2 is that the AppGameKit player doesn't seem to actually allow you to exit when you press the top of the screen for 5 seconds. Not a big deal since I needed to learn how to write actual exit code, but once again, annoying! Remove the wording for the player if it doesn't actually work! (for those beginners a good hint is to use the GetRawKeyPressed(27) command)

The issue of topic here is that I can't get images to broadcast.
I know it works, I've seen Daniel do it on his vlog. So what am I doing wrong?

I'm using AppGameKit Player 1085b that I had to dig through these forums to find (thanks TGC for keeping up the useless player on the Play store best just to remove it completely!).
I'm also using AGK's 1085 beta IDE. The apps broadcast and I can even see a percentage loading indicator, but then it shows a red X with a checkered background for all of my sprite images. The AppGameKit player says the last error is that it failed to load the "media\poppy.bmp" file, which coincides witht he red X with checkerboard images...

I'm trying this on Nexus 7 with Android 4.2.1 and and HTC droid incredible 2 running Android 2.3.4. I don't see anyone else having this problem, so I'm wondering if I missed something.

I have my images in the media folder for the project. They load fine in the Windows run. One image is 48kb at 128x128px and the other is 192kb at 256x256px. Code is below:



Any and all help is appreciated.

Hockeykid
DBPro Tool Maker
16
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 1st Jan 2013 04:04
Try using forward slashes instead of backslashes ("/" instead of "\"), I know it's an issue with iOS, I don't recall if it happened with Android or not though.

Sean

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 1st Jan 2013 04:19
Nevermind!!! I found the issue.
Apparently BMP files don't broadcast or can't be read in Andriod.
I changed the files to PNG and it works fine.

I wish I could spend more time learning and less time troubleshooting!!

I hope this helps someone else out someday.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Jan 2013 20:44
Troubleshooting is learning, lol! You now know you have to use png files on android!
Just in case you weren't aware, android is case sensitive also, so make sure your filenames and code lines match or you will see a horrible x in place of the image.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 2nd Jan 2013 18:03
The backward slash, '\', is also sometimes used to escape the next character and doesn't always produce the results you expect.

I would still recommend using the forward slash, '/', instead of the backward slash for compatibility across all platforms.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 2nd Jan 2013 19:06
Quote: "I would still recommend using the forward slash, '/', instead of the backward slash for compatibility across all platforms."


Totally agree! A lot of people think you can't use / on the PC, but you can - apart from in a DOS shell.

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 4th Jan 2013 01:30
Good to know. Maybe there should be a thread for tips like these?

This type of troubleshooting is a waste of my (and everyone else's) time. If BMPs don't work on all platforms then why include them at all in AppGameKit?

What else doesn't work or is undocumented compatibility issues?

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 4th Jan 2013 01:46
ugh... ok now JPG files won't load either???
i'm using all lower case in the filename and in the code
all i get s the big red X of death in the agk player.
PNG works fine, WAV works fine.
What gives?

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Jan 2013 01:53
I think there is an issue with progressive JPG files on Android, as the lib we use to load them doesn't support it. Have you tried loading it in something like Paint and saving it as a new JPG file?
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 4th Jan 2013 02:18
That worked. I saved it as a non-progressive JPG.
Another minor issue to document!

Thanks for the quick help, Paul.
Any chance you folks are going to address that along with BMPs not working?

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Jan 2013 02:54
Quote: "Any chance you folks are going to address that along with BMPs not working?"

Not in the short term, PNG and JPG cover everything that images need to work and I don't know if we can change the lib to support progressive encoding.
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 10th Jan 2013 08:46
After further investigation, I've found that the JPG file I was having issues with is not a progressive jpeg. I'm told the file would have the file type "image/pjpeg" if it were progressive in the meta data and is has "image/jpeg".
So some other bit is off with it. At any rate it was fine after re-saving it.
I've developed a tool that can be used to check the compatibility of images via the AppGameKit Player in response to these issues.

I'll create a separate post for it so it is easier for folks to find.

Cheers!

Nexus 7 (Jelly Bean 4.1.2) -- HTC Droid Incredible 2 (Gingerbread 2.3.?) -- Motorola Droid X (Gingerbread 2.3.4)
Willing to test for you!

Login to post a reply

Server time is: 2024-05-07 03:18:57
Your offset time is: 2024-05-07 03:18:57