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 Player Fails - Can't Fing Image File

Author
Message
Tri Alliance
19
Years of Service
User Offline
Joined: 2nd Mar 2005
Location:
Posted: 15th Jul 2013 06:59
Hi, I'm having a problem with uploading my program to my tablet, and am looking for someone who can help (I'm sure it's something simple I am missing). I created a skeleton of a program to test my sprite animations and added the images to a subfolder called 'media' (add added them as references). The program runs as expected in AGK. However, when I upload to AppGameKit Player on my tablet, the program runs but all the sprites are flashing red 'X's. I get the message 'failed to load 'media/Bomball.png', which is the last image I try to load in the program. I am missing something in the upload process, but am stumped. Please see the program listing (I added this as an attached image because I wanted to also show the left-pane of the AppGameKit screen, showing my images were recognized). Thank You in advance.

Attachments

Login to view attachments
SoftMotion3D
AGK Developer
18
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 15th Jul 2013 07:05 Edited at: 15th Jul 2013 07:08
well....generally a fail like that is due to an image format not being supported on that device.

for example on my blackberry it shows the x's if I try to load bmp format....but it works fine for png.

try to change your image format for you device to see if that fixes it.


oddly png I thought was supported by everything. but try another just to test it. it may also have something to do with images sizes...but I couldn't say for sure...

lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 15th Jul 2013 09:42 Edited at: 15th Jul 2013 09:44
I'm willing to bet a shiny monkey that the issue is case sensitivity, which windows doesn't have, but Android does. I.e if the file name is "iMaGe.png", the code loadImage("iMaGe.png") must match exactly.

Easiest is just leaving everything lower case.

My hovercraft is full of eels
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Jul 2013 11:13 Edited at: 15th Jul 2013 11:13
I'll put my half eaten packet of sweets in with lilpissywilly's shiny monkey here. I think it's the most likely problem.

Quote: "'failed to load 'media/Bomball.png"

Quote: "loadImage(14,"BombAll.png")"


Check what the actual file is called and make sure you use the same case in your code


this.mess = abs(sin(times#))
Tri Alliance
19
Years of Service
User Offline
Joined: 2nd Mar 2005
Location:
Posted: 16th Jul 2013 05:14
Thanks to all. Android tablet did not like PNG images (changed to JPG). Also, I removed the internal capital letter "A" in the file name to be doubly-sure. Everything now works as expected.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 16th Jul 2013 08:16
Png should work fine on all platforms.


this.mess = abs(sin(times#))
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 16th Jul 2013 16:48
I use nothing but png files and have no problem on any of 5 different Android devices.

I'm totally betting that it was that 'A' that was the issue.


Having said that, how were your png files created? Were they interlaced? (I think that is a generic issue for Android, if I remember right, which isn't necessarily the case.)

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-05-03 19:58:53
Your offset time is: 2024-05-03 19:58:53