godot icon indicating copy to clipboard operation
godot copied to clipboard

Games exported for iOS are not fullscreen/stretched despite the settings

Open owlnewworlds opened this issue 1 year ago • 8 comments

Tested versions

  • Reproductible with Godot 4.3 RC 1 & Godot 4.3 Beta 3

System information

Godot v4.3.rc1 - macOS 14.5.0 - Vulkan (Mobile) - integrated Apple M3 Pro - Apple M3 Pro (12 Threads)

Issue description

/!\ iOS exports seem to be broken in some cases /!\

I want to make an iOS version of my game which displays just fine on Android devices. But when I run the game from XCode on my iPad, it isn't fullscreen/stretched despite the project settings. I also tried a bunch of hacks found on Google but 1) it doesn't work better and 2) I don't like hacks :D

You will find attached two pictures, one from my own game and another one from a MRP.

WhatsApp Image 2024-07-27 at 23 45 03 WhatsApp Image 2024-07-28 at 11 02 43

Steps to reproduce

  • Create a Godot project on MacOS with the expected project stretch settings
  • Export the project for iOS
  • Open the project with XCode and run it on a device which has a higher resolution than 1080 x 1920

Minimal reproduction project (MRP)

Archive.zip

owlnewworlds avatar Jul 28 '24 09:07 owlnewworlds

Does it work on 4.2.2?

CC @bruvzg

akien-mga avatar Jul 28 '24 09:07 akien-mga

Does it work on 4.2.2?

CC @bruvzg

I can do the test if you like. I was working with 4.2.1 before but only when I was working on the Android version.

owlnewworlds avatar Jul 28 '24 09:07 owlnewworlds

That would be helpful, as there are some improvements and fixes to platform support in each minor release, but it can happen that they introduce regressions. Knowing if this is "just" a bug or a regression in 4.3 would help figure out the proper fix.

akien-mga avatar Jul 28 '24 09:07 akien-mga

You have integer viewport scaling enabled in the project settings, this is how it will look on any device unless it resolution exactly integer multiple of whatever you set in the setting.

bruvzg avatar Jul 28 '24 09:07 bruvzg

Tested with RC1. With fractional scaling, it's covering all screen on iPad. With integer scaling it had black bars on both iPad and Mac, I have not checked whether all scaling calculations are correct, but it seems like expected behavior, and it's not iOS specific.

bruvzg avatar Jul 28 '24 09:07 bruvzg

Never saw that on Android but if you say it's the expected behaviour, you're the boss, boss! ^^ I'm gonna try with fractional scaling.

I put integer because I read it was better for 2D pixel games even though my current game isn't one. So how are you supposed to display pixel perfect fullscreen on iPads ?

owlnewworlds avatar Jul 28 '24 10:07 owlnewworlds

Tested with RC1. With fractional scaling, it's covering all screen on iPad. With integer scaling it had black bars on both iPad and Mac, I have not checked whether all scaling calculations are correct, but it seems like expected behavior, and it's not iOS specific.

It works! <3 Thank you

owlnewworlds avatar Jul 28 '24 10:07 owlnewworlds

Just a tiny related question: Window.min_size can only be set through code?

owlnewworlds avatar Jul 28 '24 10:07 owlnewworlds