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 / High Images in Android

Author
Message
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 27th Jul 2012 20:11
Hi everyone.

I am testing the commands "Loadimage" and "getimageheight". I am testing in PC and android (ASUS TF101 and samsung galaxy mini).
My image is 4096x4096 (ok... it's very high, but it's a sprite sheet) When the app show the height in PC, the value is correct: 4096. But for my android device is 1024! Is the maximum height (for android) 1024? or Am I making a mistake?

Thanks!

Sorry for my english.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 28th Jul 2012 19:09
Please show us your code. It would make it much easier to see if you are actually doing what you think you are.

It's not entirely impossible that your Android is clipping the image to display only what it can.

Is the PC version showing the entire image?

Cheers,
Ancient Lady
AGK Community Tester
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 28th Jul 2012 20:17 Edited at: 28th Jul 2012 20:19
Sorry... the code is:
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 28th Jul 2012 20:18 Edited at: 28th Jul 2012 20:19


Image is a white image.

In PC the image height is 2048 or 4096. In android, it's 1024.
FakeBlood
21
Years of Service
User Offline
Joined: 18th Nov 2002
Location: Alabama, United States
Posted: 28th Jul 2012 20:39
Is it possible its doing some kind of scaling? You could test that by having something on the image instead of just white
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 28th Jul 2012 22:31
1024 is the limit on most android phones I believe. I don't think any support 4096x4096 but I could be wrong as specs improve all the time.

Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 28th Jul 2012 23:03
The scaled works and you can use images with 4096 but the image is distorted...

It's interesting load high images if you want to use subimages. I want to create a intro for my game...
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Jul 2012 17:02
I'm not surprised, you will lose loads of detail scaling a 4096 image down to 1024. I am surprised it worked at all though, but seems wasteful memory wise to use such a high image size on an android phone. Wouldn't it be more efficient to have it scaled to a more useable size and thus save on memory costs?

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 29th Jul 2012 20:52
On mobile devices (apart from ipad3) AppGameKit automatically resizes textures to 1024.

just split your spritesheet into multiple spritesheets and keep them max 1024x1024
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 30th Jul 2012 03:02
Quote: "SetDisplayAspect( 4.0/3.0 )
setvirtualresolution(640,480)"

Why do you use an percentage setting together with the virtual resolution?

Set display aspect should not be used together with virtual resolution.

Android devices have limitations of 512-1024 on image scale.

I belive galaxy mini is one of the devices with an 512x512 texture limit?

Android 2.3 Gingerbread , ZTE Skate , 480x800 , 4.3 inches , 800 mhz cpu , 512 mb ram
Android 4.0 Sandwich , Dmtech 3g 9738B , 1024x768 , 9.7 inches , cortex A8 1.2 cpu , 1 gb ram.
erebusman
12
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 30th Jul 2012 06:45
On many video cards for a long time the max texture size was 1024x.

For mobile devices I sincerely would think that size texture should be used rarely if at all as it might not be supported on all devices even if AppGameKit will take it.

It probably boils down to how compatible you want your app to be? 4/5th gen devices may be okay but mid-range and slightly older ones will probably choke.
Juande
12
Years of Service
User Offline
Joined: 2nd Sep 2011
Location:
Posted: 31st Jul 2012 19:35 Edited at: 31st Jul 2012 19:36
DVader, I am checking the limits for learning. However, it's interesting to load a big image... why? You can make a movies (intro for you game, for example) using animated sprites. Other utility... it would be show a HD game.

bjadams, Now, I am doing that, But, it's not confortable.

Cliff Mellangard 3DEGS, It's right! I don't know where I have my head... (I am spanish, Is it correct the expression "I don't know where I have my head" or do you use other...?


Thanks!

Greetings!
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 31st Jul 2012 22:02
Let's say you load a 900 x 1200 image (not spritesheet), and AppGameKit resizes it in half.

Then you do a SetSpriteSize command to get it back to 900 x 1200. Will this work on mobiles like Iphone & high-spec Android?

Login to post a reply

Server time is: 2024-04-28 06:02:07
Your offset time is: 2024-04-28 06:02:07