4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
11.23k stars 869 forks source link

Problem with the notch #4229

Open DeividHiGamboa opened 2 years ago

DeividHiGamboa commented 2 years ago

Hello, I am creating a game for mobile and in previous versions of 5.0.140, the resolution adjusted to the size of the screen but without exceeding the notch and thus no information was lost, but in the new version of gdevelop, the resolution exceeds the notch and it makes some things get lost because of the notch and also because my cell phone has rounded edges and things that are on the edges are hidden. Could something be done to make the game fit without going over the notch? I think the request could be done with a condition that says if the phone has a notch, and also an action that makes the game adjust to the notch yes/no, I wait for an answer to see if it can be solved in another way, thanks in advance

Gdevelop 5.0.140 windows 10 64 bit

AlexandreSi commented 2 years ago

Hi, thanks for taking the time to report this! I'm not sure we recently changed something around how the game id displayed on mobiles.

Could you maybe send us drawings/photos about this issue? I'm not sure I fully understand what you mean by notch and rounded edges.

DeividHiGamboa commented 2 years ago

Hi, thanks for taking the time to report this! I'm not sure we recently changed something around how the game id displayed on mobiles.

Could you maybe send us drawings/photos about this issue? I'm not sure I fully understand what you mean by notch and rounded edges.

Hi, thanks for answering, I'm going to leave 2 photos Previous versions of 5.0.140: IMG-20220826-WA0002 Version 5.0.140: IMG-20220826-WA0001 In the new version you can see that the resolution goes beyond the notch when the previous ones did not, I hope you understand and thanks in advance

Bouh commented 2 years ago

Just to headup this, I maybe found a possible solution.

In CSS there is an environment variable that can be used to define "a safe render area."

https://benfrain.com/how-to-get-the-value-of-phone-notches-environment-variables-env-in-javascript-from-css/

DeividHiGamboa commented 2 years ago

Ok, thanks for answering:)