Newbie question ref Android builds

Previous topic - Next topic

geekpeter

hey there, back again with another dumb question/problem.

sooo my last query/problem was because of me using some dodgey images as part of an app scrolly menu system, ive since abandoned that currently and made my menu function a toggle for images or text, this is now twice as handy as i can reuse my code for my current game im creating along with attempts at less gamey apps im experimenting with such as the comic/txt/ereader type app i mentioned in my other "im stuck" thread.

so far, no problems, GL Basic is doing what i want perfectly, i have a nice smooth vertically scrolling menu now, and im about to do the same for a horizontal equivalent, everything is working just as planned...... that is until i run my test build on my android devices, they dont seem to fill the screen like they do on all my other non android devices.

Its strange as 1 of my cheapo android tablets does idd fill the screen but everything else does not, its mostly the phones not doing what i want.

as an example ive linked a picture to a webOS phone and an android phone, both have resolutions of 480x800, obviously 1 is physically larger than the other but if you look at what both display onscreen, the android phone does not match the webOS phones display which it should as their displays are identical but clearly the app appears to have a lower "resolution" but stretched to fill the screen.

https://www.dropbox.com/s/3vkzmusa0eu8tuw/IMG_0093.JPG

im not sure whats gone wrong, is there something im missing on the android side to make it use the entire screen properly?  is glbasic somehow not retrieving the correct device resolution?

the detection means im using to pull the device res is probably wrong?, im getting the app to check GETDESKTOPSIZE and GETSCREENSIZE, and if the screensize is less than the desktopsize im setting the screensize to the desktopsize.

if theres any glaring issues im not yet aware of on the android side that can cause this weird onscreen shrinkage does anyone know how i can correct this.

cheers.

finnk

Just throwing this out there, I think GLBasic with Android doesn't really change the display orientation the expected way. Like sometimes, I find on my games, it's set to render in landscape, but the game is actually still in portrait with a rotated image. Maybe that's one reason the objects are scaling based on the wrong dimensions?

It does look like your objects are scaling with the wrong dimension on the other device. You could try testing for the longer side first and then using that length for the vertical height instead of directly asking for the height.

matchy

Quote from: geekpeter on 2013-May-29
...with another dumb question/problem....

Firstly, please don't use the word "dumb" and "newbie" for technical queries!  :rant: We are all the same and happy to help!

Quote from: geekpeter on 2013-May-29
..the app to check GETDESKTOPSIZE and GETSCREENSIZE, and if the screensize is less than the desktopsize im setting the screensize to the desktopsize.

Make sure that your screen width and height are what you expect by printing them on the screen. You will find that the height is less than 800px because on the icons.  :whistle:


geekpeter

ill give it a shot and print out what it thinks the dims are i just assumed X and Y were correct as the image/display are shown the correct way round.

kanonet

Be sure that you set the right resolutions for each platform in the project options. I *think* that if you set a low resolution there you cant get a higher one in the app.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

geekpeter

Quote from: kanonet on 2013-May-29
Be sure that you set the right resolutions for each platform in the project options. I *think* that if you set a low resolution there you cant get a higher one in the app.

nice, i didnt even think of the resolution option in project prefs, i assumed i could just aquire the native res the devices each run and have my app just fit to the native res which is what im trying.

For android am I supposed to enforce my apps own preferred "resolution" then let android do its own fullscreen stretch/upscale or is it possible to do what happens on everything else and just fully utilise whatever native res the device is capable of.

kanonet

As far as I know, its recommended, that you set the Project options to something like 9999x9998 (or to the highest resolution that you want to support) so android will automatically scale to its highest possible resolution (its native resolution), so you just detect what resolution is set and scale your content according to this. At least thats what I remember but im no active mobile developer. Oh and I think SETSCREEN does not work on mobile devices, but not sure on that.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

geekpeter

cheers ill take that onboard and try some test builds on what you suggest.

geekpeter

had some further time to play with my project on android, (other OS work 100% fine) but still even with changing the project options to my devices resolution 800x480 or as suggested to a much higher figure when i tell my app to show the screen width/height its showing 361x642 instead of 480x800, is there anything else i can do to force just the android build to use the correct resolution?

cheers.

kanonet

361x642 I never heart of such a strange resolution. Are you using GLB V10 or V11 beta?
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

erico

Sorry I didn´t read much into this thread, but for that last question.

Set project options resolution to that of your device 800x480 if you want landscape set.
Start your code project with a SETSCREEN 800,480,x

This should be enough to force the resolution into your device.
I have only tested it on my phone, so I´m not sure how it will behave on other devices, but it may be worth a shot.

geekpeter

using v10.283, i assumed the "latest" version was whatever the internet update option gave me when running the editor.

geekpeter

@erico, i was wanting to not set a size and have android do a dirty upscale but rather find a devices own native resolution and simply use that for a better visual quality.