Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

[BUG] Scaling Example - 2.3.0 VS 2.4.7


Matthias Elephant
 Share

Recommended Posts

Hello,

i invested some hours of testing to get the scaling that i need for my phaser game. After it works on pc i make some tests on different devices. 

Attached are two screenshots:

The "working" one is with Phaser 2.3.0.

Screenshot_Phaser2.3.0.png

The other one with current version 2.4.7.

Screenshot_Phaser2.4.7.png

 

I use the following Code:

var game = new Phaser.Game(320, 480, Phaser.AUTO, 'game');

Test.Boot.prototype = {
	preload: function() {
	},
	create: function() {
		this.game.scale.scaleMode = Phaser.ScaleManager.EXACT_FIT;
		this.game.scale.pageAlignHorizontally = true;
		this.game.scale.pageAlignVertically = true;
		this.game.state.start('Preloader');
	}
};

 

I make this test within the cocoon - developer app with a samsung s4 (window.innerWidth = 1080; window.innerHeight = 1920).

 

I know, that i could do the following:

new Phaser.Game(window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio, Phaser.AUTO, 'game');

But if i test on a device with the resolution of 1920x1080 and DPR of 2 its a very large resolution and the frames will go down. So thats isn't a valid solution to me.

I already play around with the viewport, but it seems to change nothing. Alwasy the same behaviour.

Someone can help me? 

Thank you :)

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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