Hello phaser.io community.
Here are two addresses for the same phaser.io example. One is hosted on the official site, and the other by me:
https://phaser.io/examples/v2/input/game-scale
http://olli.wtf/battleground3/scale.html
Their javascript content should be identical, but the trouble is that I'm seeing inconsistent behavior on the example hosted by me.
Steps to reproduce:
1. Open Chrome desktop browser (I'm on Windows 7 64-bit Home Premium, Chrome 64.0.3282.140 (Offi
OK, my first snippet was over-contrived, all you actually need is
game.plugins.add({
render: function () {
var game = this.game;
var debug = game.debug;
debug.text('Scale: ' + game.scale.width + ' x ' + game.scale.height, 16, 224, 'yellow', debug.font);
debug.pointer(game.input.activePointer);
}
});
Try adding
<meta name="viewport" content="initial-scale=1">