Search the Community

Showing results for tags 'show_all'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 5 results

  1. Problems in Landscape mode

    Hi everyone!, I've just started to use Phaser's framework, so I don't have enought knowledge about it. I did a game (test it here), it works well on pc's browser. The problem were when I tried to do it mobile friendly. I tried to do that (on boot's state): if (!game.device.desktop) { game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; game.scale.refresh(); } When I test it in my phone (portrait mode) it works good . The problem is when I rotate the screen (landscape mode), it doesn't scale well(I can't see the bottom). Portrait view: Landscape view: (I can't see the bottom) What is the problem ?? Thanks!!
  2. So I've been making a game in Phaser and I want it to auto scale to the size of the window so it is filled but without changing the aspect ratio, I discovered that I could do this using scaleMode = SHOW_ALL and it almost works. If I make the window smaller, the game is scaled down and the aspect ratio is maintained, however, once I've done this I can no longer scale the game up again so it remains in a smaller version even when I make the window bigger again. Here is the code I'm using: this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.pageAlignHorizontally = true; this.game.stage.backgroundColor = "#AAAAAA"; Thanks in advance for any help!
  3. Pre v2.2 I always used scale mode SHOW_ALL like this: this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = false; this.scale.setScreenSize(true); On a desktop browser, this always kept my entire game in view, regardless of how small I made the browser - either height or width. Now my code looks like this: this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.scale.setMinMax(1024/2, 672/2, 1024*2, 672*2); this.scale.pageAlignHorizontally = true; this.scale.pageAlignVertically = false; (The game parent is a div with no css attached to it) Now the game fills the browser width - scaling it up usually, and in order to maintain aspect ratio the height is also scaled up, meaning I have to scroll down to see the bottom part of the game. Pre 2.2, it used the 'minimum scale' in order to scale the game - ie. the height was smaller so it used that to determine a scale to be applied to both width and height. It appears that now it uses the maximum scale... When I resize the browser window width, the game rescales, but if I change the height it doesn't. Hoping there is a property or something easy to set to make it use the minimum scale again! Thanks a lot
  4. Updated Phaser from 2.0 to 2.2.2. Phaser.ScaleManager.SHOW_ALL behavior has changed. Red frame - game area, black frame - browser window. What wrong?
  5. i need some help understanding as to what ScaleManager and setScreenSize(true); do. this.game.scaleMode = Phaser.ScaleManager.SHOW_ALL;this.game.scale.setScreenSize(true);