I’m coming from cocos2d which has concept of virtual coordinates. You develop a game assuming the screen has resolution let’s say 1200 x 1800 and the engine translates virtual coordinates to the actual device automatically. Cannot figure out how to make something similar in Phaser.
for instance the configuration is:
const GameConf: Phaser.Types.Core.GameConfig = {
width: 1200, height: 1800,
scale: { width: "100%", height: "100%",
mode: Phaser.Scale.ScaleModes.FIT
},
};
Adding an image that has physical resolution 1200x1800: this.add.image(0, 0, 'bg').setOrigin(0, 0);
. The image remains unscaled.