Jump to content

Phaser 2.10 game responsive


luisb
 Share

Recommended Posts

Hello everyone, I have been trying different solutions to make my game full responsive, without success, the solutions I found are very old and not with the new versions of Phaser CE. Please, I need help with this urgently.
Can someone tell me how to make full responsive my game both at the beginning and when the resolution changes?

I work with angular 5 like container and Phaser CE 2.10.....

Link to comment
Share on other sites

6 minutes ago, luisb said:

Thanks @Adel  work better show all ....but  rember thar this ScalaManager methods shows white lines on the sides of the screens.. so is not enought.. and doestn work in mobiles.... :wacko:

Try setting a background image to the document, after it scales part of the images will show instead of the white borders. Setting a 16by9 resolution scale well on most of the mobile devices using SHOW_ALL.

Link to comment
Share on other sites

2 minutes ago, Adel said:

Try setting a background image to the document, after it scales part of the images will show instead of the white borders. Setting a 16by9 resolution scale well on most of the mobile devices using SHOW_ALL.

Yes  I have an Image background

let fondo = this.game.add.tileSprite(0, 0, window.screen.availWidth, window.screen.availHeight, 'fondo');
Link to comment
Share on other sites

2 minutes ago, Adel said:

I meant a background image to the html document, and when the canvas is centered, if it doesn't fill all the document part of the image will be visible.

Ok I understand sorry...but when execute the game in my mobyle anything work...the scale is horrible.

Link to comment
Share on other sites

12 minutes ago, Adel said:

What is the screen size of the device you tested, try this mini game on a mobile browser on portrait mode [only tested on chrome], and click on the full screen button, it uses SHOW_ALL scaling.

In chrome work excellent he...but when I prove with my samsung S8 doesnt work.

I proved your minigame in my cellphone but show black screen

Link to comment
Share on other sites

7 minutes ago, Adel said:

Try testing various settings, or maybe someone with more phaser experience will answer.

 

If I prove in chrome with diferents resize work so so, I mean show a lot of blank lines but work... but when I start my game in device mobile show an horrible orientation...always with SHOW ALL..otrer alternatives doesnt work...like USEr_SCALE... I think that is not possible that I will scale all sprites is unviable

Link to comment
Share on other sites

22 minutes ago, samme said:

There's no single "responsive" behavior — it depends on what you want to do — so you're going to have to try a few things.

 

Hi ...is a slot casino  game...I mean  a square with sprite and background...I think that phaser should be scale this in automatic way....I try with  this  frun pen  but do nothing

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...