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 / Tier 2, Power of 2, part 2

Author
Message
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 11th Jan 2012 20:23
Okay, so we've been trying to get our game running on Android and iOS, and one of the problems we ran into was power of 2.

This problem only affected our backgrounds, which were 1024x768.

The Android tablet did not load the image at all. However, we changed the image size to 1296x841, and then the images started loading up.

Why did we change this? Because our math major programmer said that power of 2 would be X^2 now 2^X. Being that this worked, I'm wondering if the documentation is wrong, or if we just did something else that made it work. I ask because we are not getting any images at all to show up for iOS, which is using our original 1024x768 images.
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 12th Jan 2012 05:15
Not sure if this is the problem yet...but I did find a partial solution.

For my PC, whenever I was working with % floats, it was xx.xxx, for iOS, it is 0.xxx
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 12th Jan 2012 15:11
In graphics programming power of 2 refers to the values 2,4,8,16,32,64,128,256,512,1024 so I'm not sure why the image isn't appearing. Does a 1024x512 image work?
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 12th Jan 2012 20:00
Well, for the Android we are working, 512 would not be tall enough to fit over the screen, it needs to at least be over 800...unless you wanted to test for something else....

On another note, for iPad, I found some interesting issues that (at least for the moment) I have no idea how to fix. I'm using 1024x768 still--on two different images. Both of them do not load in at first. Both of these 1024x768 images are part of themes. One is a PNG with lots of transparency, the other is a JPG that is supposed to fill the entire screen. The user can load in new themes whenever they want. Again, at first, neither of these two images load.

Then, when moving to another theme, the PNG loads. This image loads from then on.

Later (after reloading over and over again--about 6 times) the JPG loads. This image then loads from then on.

I'm baffled.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 12th Jan 2012 20:16 Edited at: 12th Jan 2012 20:21
I know that on Android images appear white when there's not enough graphical memory to load the image. For mobile devices you shouldn't have too hi-res images or this can happen. To flush the memory you have to reboot the device.

Try rebooting and then immediately run your app without loading anything else. If the app runs perfectly it could very well be a case of not enough memory.

Oh, and your math teacher is absolutely correct. A power of 2 is X^2. Don't know what to call 2^X which is what you need to worry about with computers. Binary numbers perhaps?

ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 12th Jan 2012 20:27
Thanks! I'll tell my android guy about that (I'm the apple guy on the team).

So for iOS, I think I might be close to a solution: I have a save file that saves the users' preference. However, at start, the file has not been created. I have default selections in the code for this case, however, I don't think the code is using them for some reason.

The problem is, the only way to test this is to delete the file I created. Here comes the problem:

Where on the iOS or Mac does the file get saved? I cannot find it anywhere.
ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 12th Jan 2012 20:57
Problem Solved on iPad!

It was something completely unrelated to the above problems. Not sure why it wasn't showing up before. If the save file was not created, it was looking for images in the wrong folder.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 12th Jan 2012 22:39
I don't know if it's possible with AppGameKit but it sounds like you are altering AGKs current directory.

ManOfActionTM
12
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 13th Jan 2012 00:13
nope...I have all of my assets separated by theme. All is well now that I have it looking in the correct folder!

Login to post a reply

Server time is: 2024-04-27 06:13:10
Your offset time is: 2024-04-27 06:13:10