Jump to content

Search the Community

Showing results for tags 'viewport scaling phaser sprite image'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi Folks, I'm writing a tetris clone and want the game's height to scale to fit different window sizes. The game runs perfectly at its native 400 x 800, and I want to scale the entire canvas to fit smaller screen sizes. I'm using 'game.stage.scaleMode = Phaser.ScaleManager.SHOW_ALL' in the preload(), but to no avail. I've noticed in this Phaser demo that my ViewportWidth and ViewportHeight are undefined (tested on Firefox, Chrome, and Edge). I've a hunch that these values are used to determine the scale, and that being 'undefined' is stopping things from working. I could write in my own scaling using window heights etc, but that's a lot of double handling if Phaser can resize the whole canvas. Am I missing something? Many thanks in advance!
×
×
  • Create New...