luisb Posted March 9, 2018 Share Posted March 9, 2018 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 More sharing options...
samme Posted March 9, 2018 Share Posted March 9, 2018 Link to comment Share on other sites More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 32 minutes ago, samme said: sorry but doesn't work, could you give and example where it work? I need resize all the canvas.... samme 1 Link to comment Share on other sites More sharing options...
Adel Posted March 9, 2018 Share Posted March 9, 2018 Have tried SHOW_ALL scaling mode this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.setMinMax(this.game.width / 2, this.game.height / 2, this.game.width * 2, this.game.width * 2); this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = true; Link to comment Share on other sites More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 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.... Link to comment Share on other sites More sharing options...
Adel Posted March 9, 2018 Share Posted March 9, 2018 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.... 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 More sharing options...
Adel Posted March 9, 2018 Share Posted March 9, 2018 This ScaleManager guide is worth reading. Link to comment Share on other sites More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 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 More sharing options...
Adel Posted March 9, 2018 Share Posted March 9, 2018 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. Link to comment Share on other sites More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 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 More sharing options...
Adel Posted March 9, 2018 Share Posted March 9, 2018 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. Link to comment Share on other sites More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 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 More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 @Adel I read the book but is so basic, dont work for me .. I dont now what is the solution Link to comment Share on other sites More sharing options...
Adel Posted March 9, 2018 Share Posted March 9, 2018 Try testing various settings, or maybe someone with more phaser experience will answer. Link to comment Share on other sites More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 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 More sharing options...
onlycape Posted March 9, 2018 Share Posted March 9, 2018 In my case, I used scaleMode USER_SCALE with a callback for the size changes of the window. I show it in this post: http://www.html5gamedevs.com/topic/35767-responsive-fullscreen/?do=findComment&comment=205287 And here the result: http://jjgames.pcriot.com/ Regards. Link to comment Share on other sites More sharing options...
samme Posted March 9, 2018 Share Posted March 9, 2018 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. Link to comment Share on other sites More sharing options...
luisb Posted March 9, 2018 Author Share Posted March 9, 2018 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 More sharing options...
Recommended Posts