HTML5 scale mode

rodolfovs

  • *
  • Posts: 159
Hi

Does the scale mode function work differently on mobile and html5 exported games? When I test on the phone it fills the full screen, while and html5 doesn't fill, I've already tested all possible options for testing html and I can't do that.

What I really need is the following, I need to export the game in landscape format 16:9, but when it is accessed by the mobile browser it changes to portrait format 9:16, but in both cases keeping the images undistorted and filling the entire screen. Is it possible to do that?

rob1221

  • *
  • Posts: 9456
Does <window resizable="true" /> in OpenFL Settings not work for HTML5 on mobile browsers?  Note that the website you're hosting the game on actually has to change the window size for the game to resize itself.

rodolfovs

  • *
  • Posts: 159
The resizable function works, but as the screen size changes, it leaves black bands, not complete the screen. I made a sample image of what I am trying.

rob1221

  • *
  • Posts: 9456
The game doesn't fill the screen because the aspect ratio stays the same and the game can't extend beyond the window.  I'm not sure how you would do what you're trying to do.  I tested the set screen size block but it had no visual effect.

rodolfovs

  • *
  • Posts: 159
In the case of html5 it does not fit the screen, unlike mobile, because in mobile I can use 320x480 and if the screen is 320x550 the game fills everything, but in the case of html5 should not work that way.

I'll see how I can do it and if I can do it.

Thanks for the help Rob.