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 / My background graphics on the android don't show

Author
Message
Zubby1970
AGK Backer
16
Years of Service
User Offline
Joined: 22nd May 2008
Playing: AGK Studio Always
Posted: 24th Dec 2011 22:59
i have a large image which is 4068 x 50 and 4068 x 320 , they show up as white on the screen every other image shows up perfectly they are both png format. any one got any ideas.

it works perfect on iOS. using the AppGameKit player not viewer.

There can only be one
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 25th Dec 2011 10:20
I had this problem to yesterday, I tried to make animated water but the image was to big and turned out to be completley white. I think my image was 5000 x 512 or something. I have heard there are some "problems" with images that makes them "a power of 2" I think that means that a 4068 X 1 image gets turned into 4068 x 4068 image...
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 25th Dec 2011 12:03
I think you have hit the maximum image size of your graphics hardware. Not long ago PC hardware didn't support images larger than 2048x2048.

Images are sized up to a power of 2 on each side separately. For example an image that is 100x50 will become 128x64.

JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 26th Dec 2011 10:52
Somebody somewhere else wrote that 1024x1024 was the maximum size for an image. I don't know if this is true or not.

-- Jim
Zubby1970
AGK Backer
16
Years of Service
User Offline
Joined: 22nd May 2008
Playing: AGK Studio Always
Posted: 26th Dec 2011 13:39
on the ios platform it works fine all graphics show up, also I know the graphics has been recognised by AppGameKit, because in physics debug mode i can see the shape of the ground and the bike follows the shape of the ground perfectly.

There can only be one
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 26th Dec 2011 15:52
You will always encounter devices with different hardware. Even if it works on your iPhone, it might not work on the previous generation. Android is even worse as there are phones made for all price segments out of parts from different manufacturers.

You should consider using a smaller image and scale it up or cut it into multiple smaller ones. Something like that might improve speed on older hardware as well.

How big is a 4068 x 320 png anyway? 5MB? If you use one per level your game would be quite large. People without access to WiFi might not want to download because of the size.

Zubby1970
AGK Backer
16
Years of Service
User Offline
Joined: 22nd May 2008
Playing: AGK Studio Always
Posted: 27th Dec 2011 01:49
no its a very small file its only 79.1 kb in size, but im going to make it smaller as it is a repeated background anyway, so ill try your advice thanks.

There can only be one
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 27th Dec 2011 10:46
Oh, yeah. I forgot PNG has compression

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 1st Jan 2012 19:47
"i have a large image which is 4068 x 50 and 4068 x 320"
Your images are not powers of 2. This means on some devices the graphics will work (decent computer with a reasonable video card). On other devices they will cause issues. This is because some video hardware does not allow non ^2 image sizes. If you changed your images to 4068x64 and 4068x256 they should work. I have heard this 1024 limit as well for phones, but have not tested it out yet. So you may have to cut your images into 4 1024 size chunks at the least if you still have problems.

Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 2nd Jan 2012 02:31
4068 is an incorrect size, it's 4096.

Using ^2 sized images or not shouldn't make any difference, I think. AppGameKit will increase the size of the image when it's loaded. It's a waste of RAM, but I think that's about it. So it's a good thing to keep in mind cause a 130x130 image would become 256x256 in memory while 128x128 would take up 75% less space. Using 125x125 images isn't as bad. Correct me if I'm wrong.

Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd Jan 2012 20:28
I got this email today regarding white backgrounds in a game I've bought:

White squares/backgrounds are an indication that you're running low on video memory. Firstly, if you have the HD graphics pack installed, please uninstall it and revert to standard graphics.

The following suggestions may also help:

- Force quit the game and reboot your phone to free up memory
- Close down any unnecessary apps running in the background while you play

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Feb 2012 18:26
Ah, yes, I just copied the original post size. No idea how I missed that one! It seems a few peeps are struggling a little with memory restrictions of late. My current project, Obliterator (or the unnamed shooter in the wip), so far has had no issues on android at least and I load a fair amount of graphics up each level so far.
I've not noticed any memory commands to check available memory in agk as of yet(Tier 1 ). It would possibly help give us an indication of what we are working with. I don't even know how much memory most phones have these days!

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Feb 2012 19:00
I would be surprised to see 4096 images working on a mobile device. iOS scales large images down until they are within 1024x1024 so they will lose quality. Android will just refuse to render it. Windows will handle 4096 or more with recent graphics cards. I would recommend 1024x1024 as a good guide to support as many devices as possible.

Login to post a reply

Server time is: 2024-11-23 15:21:16
Your offset time is: 2024-11-23 15:21:16