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 Studio Chat / [SOLVED] Full Screen With Stretch(no Black Borders) On Android Mobile Devices?

Author
Message
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 13th Apr 2022 19:07
Hi,

Been fighting all day with below:
How can we have full screen with stretch(no black borders) on Android mobile devices?
Hope someone knows, thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com

The author of this post has marked a post as an answer.

Go to answer

JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 13th Apr 2022 19:23
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
blink0k
Moderator
9
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Apr 2022 22:36
This has only just been fixed on the latest release.
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 13th Apr 2022 22:41
Can you tell me the command?
thank you - saving me hours of madness...
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
blink0k
Moderator
9
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 13th Apr 2022 22:50
You have the correct command SetImmersiveMode(1) (However you should read the documentation carefully to understand how to use it)
What you do need is the latest version of AppGameKit Studio
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 13th Apr 2022 23:06
Running Studio from Windows Steam...
...has the newest version been released on Steam?
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
blink0k
Moderator
9
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Apr 2022 04:41 Edited at: 14th Apr 2022 04:41
You can check the version by clicking Help/About
Latest version is 2022.03.2
If you're broadcasting i guess you will need the latest player too
Zaxxan
1
Years of Service
User Offline
Joined: 17th Nov 2020
Location:
Posted: 14th Apr 2022 07:20 Edited at: 14th Apr 2022 07:21
Unfortunately the current player available from Google play store does not work with the latest full screen update. Orvillian has said that a new player will be released soon but this has not happened yet.
Virtual Nomad
Moderator
16
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 14th Apr 2022 08:04
reminds me of THIS.

have you tried actually exporting and testing vs broadcast?
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 14th Apr 2022 10:47
Little confused...
Full screen with stretch on Android is not working...
But will be fixed in the next update soon?
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
blink0k
Moderator
9
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Apr 2022 21:43
Also try executing SetImmersiveMode() before every sync
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 14th Apr 2022 23:05
Tried that, does not work...
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
blink0k
Moderator
9
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 15th Apr 2022 00:23
I works for me if i set fullscreen mode for the app in my settings (Search for "Full screen" in settings)
You might be able to modify the manifest so this is set when installed
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 15th Apr 2022 00:50
Hi,

I looked through completely AppGameKit Studio,
there is no "Settings" anywhere?

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
blink0k
Moderator
9
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 15th Apr 2022 03:21
Settings on your mobile phone
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 15th Apr 2022 15:44
Sorry, but that is not an acceptable solution.
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
hendron
6
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 16th Apr 2022 14:26
I don't work with mobile platforms so I'm not entirely sure if this is what you're after. If you're trying to get around the black borders caused by the aspect ratio difference between your virtual resolution and the device's screen size and you want it to stretch the graphics to fit, I'm thinking you'll have to use a render target. Basically, you render your game to a render image at the game's target resolution, and then render that image to the screen via a full screen sprite at the device's native resolution (or one that matches the device's aspect ratio). You'll have to break up the sync process manually to do this. Also, doing so will probably cause any functionality that relies on the pointer position to break, as the positions will need to be translated from screen space to game space first.



I haven't tested this code but hopefully it conveys the idea.
Zaxxan
1
Years of Service
User Offline
Joined: 17th Nov 2020
Location:
Posted: 16th Apr 2022 18:45 Edited at: 16th Apr 2022 18:46
@jezxlee, are you producing an apk or broadcasting to your device? It might be useful if you upload a image of your phone so that we can see what black borders you have.
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 16th Apr 2022 20:27 Edited at: 16th Apr 2022 20:28
Hi,

We have the full screen stretch (don't care about aspect ratio) working now on Android smartphone & tablet...

But the touch coordinate system is now incorrect.
Been fighting with it for a few hours.
(My math skills are just atrocious)

Below *SHOULD* work, but it is does not?
(Game screen is setup to 360x640 - portrait)
AppGameKit reports:
Max screen width = 810
Max screen height = 1800

Any ideas?
(I can clean the entire source code and upload to GitHub if you need me to)

Jesse

JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
hendron
6
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 16th Apr 2022 21:34
assuming your virtual resolution is set to MaxDeviceWidth,MaxDeviceHeight when getting the pointer position, the calculation should be:

X = GetPointerX() / GetMaxDeviceWidth() * 360.0
Y = GetPointerY() / GetMaxDeviceHeight() * 640.0
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 16th Apr 2022 22:00
Ha...

It's finally works on both my Android smartphone and tablet...

hendron - do you have a website or a blog that I can promote in the game's staff screen?

Many thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 17th Apr 2022 13:47
Hi,

Game is 100%...

M.I.T. source code is updated on GitHub below:
https://github.com/FallenAngelSoftware/AppGameKit-LettersFall

Thanks!

Jesse
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 17th Apr 2022 13:49
This post has been marked by the post author as the answer.


JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 17th Apr 2022 17:17
Here is the finished game source code on GitHub:
https://github.com/FallenAngelSoftware/AppGameKit-LettersFall
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
Zaxxan
1
Years of Service
User Offline
Joined: 17th Nov 2020
Location:
Posted: 19th Apr 2022 12:31
Thanks for posting the source code. I will take a look as I have never tried making a word based game before.
JeZxLee
5
Years of Service
User Offline
Joined: 15th Mar 2017
Location: Long Island, New York, United States, Earth
Posted: 19th Apr 2022 14:26
Ok, it's 100% M.I.T. free open-source - do what ever you like with the source code...
JeZxLee
Fallen Angel Software
Video Game Design Studio
https://www.FallenAngelSoftware.com
hendron
6
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 20th Apr 2022 18:29
Quote: "hendron - do you have a website or a blog that I can promote in the game's staff screen?"


No I don't. I have an itch.io page but there is nothing on it at the moment. No worries though, glad my solution worked out.
Raven
17
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 15th May 2022 01:07
As counter intuitive as this is going to sound... the best solution is simply not to use Fullscreen Mode on Mobile Devices.
I think it's important to understand how Mobile OS work., as they're different to Desktop OS.

The Foreground Application is ALWAYS Fullscreen., while Background Applications are ALWAYS disabled from accessing most of the Hardware.
It doesn't strictly mean they're "Idle" per se, you still must program an Idle / Low Power State... as a note: Android Go 10, 11 and 12 have some issues you might want to avoid with Process Scheduling.
I have far too many Applications (usually games) that will trigger Scheduling Conflicts and Cache Overruns., so Timers help to detect when this occurs, and to deliberately halt various operations until the cache clears itself out.
In-fact I'd recommend if you detect such, to post a notification that a problem has occurred that requires the application to close.

While such can be frustrating to users., believe me... loosing even the ability to RESET the Device until you've manually closed an App causing such is much more problematic as it can take MINUTES to do.
I most commonly have said issue with Infinite Galaxy and Warhammer 40K Lost Crusade... fun games, but they do have a habit of bricking my phone; and I have a Handset capable of running Fortnite at 30FPS on Medium.

Still, as noted whatever App is in the Foreground can be treated as a Dedicated Application; just as you would on a Console.
Yes... other Applications are "technically" still running., but they're stripped down to a "Service" as opposed to a Runtime.

As such we can ignore things such-as "Immersive" or "Fullscreen"., these are really for Desktop, TV or Browser; where the Application isn't the dedicated Runtime.
Instead all you need to worry about is making sure that the Window and Virtual Resolution are set to a Divisible of the Maximum Device Resolution.
So, say for example the Target Handset is 1920x1080., then you should have the resolutions: 1920x1080, 960x540 or 480x270.
Always set the Screen Scissor to 0,0,0,0 by Default.

I'd add an option to the Options Menu called "Overscan Compensation" with a sliding scale bar to allow people to adjust to personal preference.
Maybe even add individual Width and Height compensation.
The reason I say this is because A LOT of devices now., will embed Cameras as well as curve the corners of the screens... so having it at the limits of the Display isn't always ideal.
Especially when the Touch Area of the Display is usually smaller than said total area of the Display.
Still this said it is always a good idea to have a "Deadzone" for Touch... there are various Whitepapers on Designing Game UI to work on Overscan Displays., I'd recommend a similar approach to Touch Support and Mobile UI as well.
This just ensures that your application is always controllable.

Again on my device if I accidentally swipe up, not enough to put the App into the App Manager but enough to bring up the Bar for it; sometimes it can get "Stuck" in a reduced touch area which doesn't match the Application Display Output (taking up the whole screen).
It's just a suggestion though., and a mistake I see from very established Mobile Developers with a myriad of titles under their belt still making.
Still taking such into account can add just that bit of polish that users will notice.

Login to post a reply

Server time is: 2022-05-27 15:56:54
Your offset time is: 2022-05-27 15:56:54