samme Posted October 4, 2017 Share Posted October 4, 2017 Sprites in particular. With game.resolution = 2, everything looks correct to me except the sprite dimensions: they should be 64 × 64 game pixels, just like the sprite's texture, but instead they're 128 × 128 game pixels. The texture fills only a quarter of the sprite. Machine-dev 1 Link to comment Share on other sites More sharing options...
pyre Posted November 15, 2017 Share Posted November 15, 2017 That looks like a bug to me and happens with < 1.0 resolutions as well. @samme Why do you want to use a resolution greater than 1.0? I can't see any point going above that scale because you're not taking advantage of the whole canvas. On the other hand, 0.5 = each sprite pixel takes 4 screen pixels and so forth. This runs a lot faster on the GPU and is how I can get my game to run at 60fps on devices with slower graphics cards :-) Something cool I found: You can dynamically change the resolution without reloading the game by directly modifying this._game.renderer.resolution (reading the docs of Phaser.Game says it's read only and can only be set via the configuration object, see https://github.com/photonstorm/phaser/commit/74eeddf956963bff2b1b03a8ab5b7563d25cb818) Edit: More info here https://github.com/photonstorm/phaser/issues/2946 Machine-dev 1 Link to comment Share on other sites More sharing options...
samme Posted November 15, 2017 Author Share Posted November 15, 2017 Thanks for the feedback. resolution = 2 would make a difference on hi-res displays. You can also use renderer.resize(…) or scale.updateDimensions(…, true). pyre 1 Link to comment Share on other sites More sharing options...
Recommended Posts