Facebook instance game screen not fit

when I trying to lunch my instance game, it displays like this.this happens only iPhone devices, it works fine in android devices and debugger

02%20AM

please help me

Are you using the index.html provided in the fbinstant project? What window dimensions have you set in game.project?

yes, i am using the index.html provided in the fbinstant folder.
14%20AM 23%20AM

57%20AM

Ah, ok, so you want to create a landscape mode game? I think you need to specify orientation in the bundle config: https://developers.facebook.com/docs/games/instant-games/sdk/bundle-config/

yes dear i need to create landscape mode game and i used fbapp-config.json like this,

{
  "instant_games": {
    "platform_version": "RICH_GAMEPLAY",
    "orientation": "LANDSCAPE",
    "navigation_menu_version": "NAV_FLOATING",
    "custom_update_templates": {
      "play_turn": {
        "example": "Edgar played their move"
      }
    }
  }
}

is this need to be change.

1 Like

Ok, let me take a closer look and see if I can reproduce the problem. I think we’ve only tested with portrait mode games in the past.

2 Likes

Would you mind sharing the game with me (bjorn.ritzl@king.com)?

It is pleasure to share the game with you and please kindly check email for login details

1 Like

Thanks, I’ll take a look soon.

Thank you for the Facebook user test account invite. I logged in on Facebook messenger using the account you provided on an iPhone 8 Plus and the game was displayed in landscape mode without any visual problems (see screenshot sent via mail).

Dear Björn,

we test that app with many devices(iPhone s6, iPhone 8 plus,…) and we all face that issue. (see a video link sent via mail).

2 Likes

Yes, I saw the video. So it for some reason doesn’t handle the orientation changes properly. It might be caused by a problem in the index.html. Can you please check your game.project and verify that Dynamic Orientation is unchecked under the Display section?

@Pkeod and @AGulev, did you have any problems with screen orientation on iOS devices when you rotated the device in the four different orientations in your instant games?

2 Likes

Our Solitaire Klondike in portrait by default. And we are using our own index.html. As I know we have no this problem.

2 Likes

Could you please share it so I can take a look?

1 Like

Yes, of course:
engine_template.html.zip (1.8 KB)

1 Like

Hmm, I don’t see any important differences between yours and the original. @uditha can you please confirm the state of the “Dynamic Orientation” setting?

1 Like

yes britzl.we config project.config file with "Dynamic Orientation ". but we still face the issue

image

You should not check Dynamic Orientation!

If you do check Dynamic Orientation it means that your game should be playable in both landscape and portrait mode. Defold will in this case respond to orientation changes and try to render the game in the orientation the game is currently in. And it is up to you as a developer to make sure that you provide a gui and a game setup that makes your game playable in both landscape and portrait mode.

If you have it unchecked it means that Defold will ignore how the device is rotated and only allow gameplay in the orientation provided by width and height, in your case landscape mode.

ok britzl, in previous versions ( before today version) we not checked Dynamic Orientation option. but we faced the issue.

for your reference i can add our index.html pageindex.html.zip (2.6 KB)