Android resolutions and test

Previous topic - Next topic

spacefractal

#30
That why im want letterbox in the game (often top/bottom), like in a movie if should happens.

The code im gave you in PM would not have a issue in correct orientation. Its would been letterboxed top/bottom or left/right (depend on resolution). Im dont mind them at all.  In the pm code im gave you, you can still uses perfect scaling for contain known resolutions and might crop few pixels (only scaling value is required to been set).

If you dont like letterbox, then create a Super Gameboy style border.

Karma Miwa does not check when you turn around your device. This is handled by the Android system automatic (and required in iOS), but did need a orientation fix throught in the boot. Im love "sensorLandscape" (require SDK 2.3+). Its took time to deal with Android many resolutions too with the camera/scrolling system.


Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

#31
Quote from: spacefractal on 2014-May-31
That why im want letterbox in the game (often top/bottom), like in a movie if should happens.
...

Should not be a problem, I designed the game to happen on a 320x240 screen, later I added up to 428x240 so I could have spare to crop and also to fill android resolutions, and also full hd and the likes. What I didn´t want for sure was a black border on the sides.

On my list, there are a few resolutions that go way too close on under 320 (type 24 for example), those would probably be better at letterbox (type 0-5 too), specially since touch devices may take extra sides for control as I don´t want fingers getting on the way of action. But I would like it to look like the game, no gameboy borders or the likes.

erico

Tested the APK on another old device,
an LG-e305:

type     41
x          320
y          240
navbar 0
fps       50

pretty much as the other LG, should get to different phones in a couple days...


spacefractal

#33
Black border on the side would not been a problem either. This is just make sure for better control area instead. So fingers dosent cover over the actions.... It's happens automatic with the code givin.

On the side border some colors could been used, but not if it's a normal letterbox. But that up to you.

Ps. I'm do have seen some iOS game with those borders by design.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

Here the galaxy s2:
type     37
x          800
y          480
navbar 0
fps       60

erico

#35
Here a failed one I had the chance to test today.
It is a GT-S5830B fone, at a resolution of 480x320...a resolution not supported by the current hardcoded code.

I don´t get to see this kind of phones going around and people who use it, got it free from operator and only worry for the actual phone ability.
I don´t think I should support it for the current game I´m finishing up (specially as I don´t want to break the pixels too much).

Here a picture of it failing.

So far the rest and tablets are all going ok :)

Mental? Hark0? any news? ::)

Space Fractal sent me an update code with it supporting all resolutions, and a very well done feat.
Maybe this could be a good code to help people starting up android dev? It may be worth a newer thread. :good:

spacefractal

#36
You could do something like this in your androidmanifest.xml:

Code (glbasic) Select

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.%YOURCOMPANY_LOWERCASE%.%APPNAME%"
      android:installLocation="preferExternal"
      android:versionCode="%GLB_PROJ_VERSION_INT%"
      android:versionName="%GLB_PROJ_VERSION%">
    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="14" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<supports-screens android:resizeable="false"
  android:smallScreens="false"
  android:normalScreens="true"
  android:largeScreens="true"
  android:anyDensity="true" />
    <application android:label="@string/app_name" android:icon="@drawable/icon" android:debuggable="false">
        <activity android:name="org.libsdl.app.SDLActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
>
<!-- android:screenOrientation="sensor"  android:configChanges="orientation|keyboardHidden" -->
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>


If you upgrade to AE, then you can add android:xlargeScreens=false to the list too. You can then minSdkVersion to "9", even you uses "8" in glbasic. This is so older devices got delisted in the Google Play as well small screen support. Then im pretty sure you would have a greater support, because most problem devices now got delisted (im did the same for Karma Miwa too).

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

Yep, most likely I have to take the 480x320 and probably the 320x240 resolutions off the game on the Play Store.
I haven´t checked yet what is supposed to be on the manifest neither how to sign up the app.
So this will come handy, thanks Space!

I made a few more tests, all ok so far, here I post an S4 result, but I don´t see much reason to post more, it seems to work fine.
One think though, that got me thinking, Some navigation bar seems to be transparent, or the next round will be, so in some of my repositioning, I don´t have extra image to show on this transparency and there will be a little black part under it. No much a trouble, but something to think about design wise from now on.

Here the galaxy s4:
type     6
x          1920
y          1080
navbar 0
fps       56

The fps there don´t mean much, it does hold the speed in game as tested, it was probably something by the snapshot/screenshot.

As Space already told me, it will be nice to release a code on the snippets that attends to scaling for multiple android outputs (and maybe ios too) so others can enjoy it.
I also thought to release some other parts on my code, like the touch control that reads the last in-press touch for action games.

Give me a little while for that as I have to move again... :rant:

Hark0

Hi Erico, my And device are 800x400 px resolution...

The first APK (game) works correctly (screen have correct resolution/adapt)...

Today I install this APK... sorry (very very busy)  :-[
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

spacefractal

im have posted the scaling code im gave Erico, which also readed the mousepos etc. Its posted here:
http://www.glbasic.com/forum/index.php?topic=9848.msg85853#msg85853
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

erico

Thanks HArk0, all seems just fine!

Good thing Space, I may add a few things there to try and get the virtual screen away from it.
But it is good it is available because as soon as someone gets an android compilation going, the next step is to deal the screen size.

I hope it helps users around.

Hark0

Quote from: erico on 2014-Jun-04
Thanks HArk0, all seems just fine!

Good thing Space, I may add a few things there to try and get the virtual screen away from it.
But it is good it is available because as soon as someone gets an android compilation going, the next step is to deal the screen size.

I hope it helps users around.

I send to you a photos of my android device:

Alcatel Onetouch 992D:

- Type: 37
- GetScreen X: 800
- GetScreen Y: 480
- Nav Bar Size: 0
- FPS: 60
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic

erico

yep thanks, here the pic, looks fine

erico

I occurred  to me I never set this thread to an end.
So forth, all the many more tested device I got hand into did ok, so I guess I´m good for now till the highest resolution support, which should be a couple years....till they push 4k into mobiles :D :D

Thank you all for taking the time to help on this front. :good:

Hark0

Hi, I have new mobile phone Android... are a Orange Gova (huawei ascend g6 maybe)...

Have a 540x960 px... quad core... os 4.3... rooted  =D

If you have a new apk for test... I can install on phone!
http://litiopixel.blogspot.com
litiopixel.blogspot.com - Desarrollo videojuegos Indie · Pixel-Art · Retroinformática · Electrónica Development Indie Videogames · Pixel-Art · Retrocomputing · Electronic