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 / Google Pixel 4 --full screen/black border issues.

Author
Message
countryside
11
Years of Service
User Offline
Joined: 15th Mar 2013
Location:
Posted: 13th Feb 2022 04:29
For some reason my Pixel 4 will not go full screen. Setscissor (0,0,0,0) command doesn't work. Setdisplayaspect(-1) will stretch it out(full screen) but nothing lines up correctly.
I tried older games I made that worked great on my moto g4 phone now no longer go full screen on the Pixel 4. Not sure what else to try.
Does anyone with a Pixel 4 have any issues?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 13th Feb 2022 05:42
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 13th Feb 2022 05:43 Edited at: 13th Feb 2022 05:45
Setscissor (0,0,0,0) cuts out any black boarders, it does not stretch out the screen.

Setdisplayaspect(-1) works on all devices as it displays everything in percent's.

You have to make sure you position your images with in 100,100

What I do is load my images and set there size to 100,100

And to position them correctly to set there positions to 50,50

So if you use this, make sure you set all your images with in the 100,100 range,

As for the Pixel 4, I can not answer because i do not own one.

And yes, you can try SetImmersiveMode(1) as above.
countryside
11
Years of Service
User Offline
Joined: 15th Mar 2013
Location:
Posted: 13th Feb 2022 06:15
Thanks for the responses.....the only thing that kinda works is setdisplayaspect(-1)
But I'd have to redo a bunch of stuff because my sprites are out of whack, plus if I ever want to play or
improve some of my older games I would have to add " setdisplayaspect(-1)"
to every program and re-position all my sprites just to play them on my Pixel 4.
I wish setscissors command worked with my Pixel but I may be forced to go
back to broadcasting using my older phone. At this point I'll try making this game
using setdisplayaspect(-1) and then do some tests to see if what I see on my
Pixel will look the same on my sons galaxy. I just never had this problem before
but I'll give it a whirl :->
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 13th Feb 2022 12:53
The ONLY time you should ever use SetDisplayAspect(-1) is if you only ever intend to run the game on the Pixel 4 and nothing else ... ever!
That's because it stretches the display to your screen size which distorts everything on it. The reason it is distorted is because it uses a percentage based system with zero on the left/top and 100 on the right/bottom. Obviously your screen isn't square so it has to stretch everything
You then have to design all your sprites so that they appear correctly on the distorted display. That is fine until you run the game on a different device with a different size and they are distorted again. What's worse is if you want to be able to use the game in both landscape and portrait because using SetDisplayAspect(-1) means you will need to create two of every sprite - one warped in X and the other warped in Y.

If you want it to look good on different devices (and different orientations) then you have two options:
1) Use Virtual Resolution. In the case of a Pixel 4 that is 2280 x 1080. If you do that it will always look correct and without distortion but you may have black borders on another device that has a different aspect ratio.
2)Use SetScissor(0, 0, 0, 0). That will give you the percent based resolution again but this time 0-100 is in the centre of the screen and you will need to calculate the actual size of the screen with the GetScreenBounds...() commands.

Option 2 will give the best results but takes a lot more work.
See here for a more complete explanation of how to get the best results from your display.
countryside
11
Years of Service
User Offline
Joined: 15th Mar 2013
Location:
Posted: 13th Feb 2022 16:41
Thanks Scraggle....I'll check out option 2 for a bit :->
or I'll have to live with the black borders...or just not use my Pixel.
I've tried the VR 2280x1080 and Setscissor(0,0,0,0) but no luck still have black borders.
Maybe its a google thing? I don't know. Thanks again for you help.

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 13th Feb 2022 16:55
I don't have a Pixel 4. But I do have a Pixel 3 XL and a Pixel 5, and I have no issues with either of them when following the tutorial I linked you to. I can't imagine that Google did anything different with the 4
countryside
11
Years of Service
User Offline
Joined: 15th Mar 2013
Location:
Posted: 13th Feb 2022 20:08
I wouldn't think so either...
I'll figure something out....thanks again for you help.

Login to post a reply

Server time is: 2024-03-29 11:40:36
Your offset time is: 2024-03-29 11:40:36