Closed PaulB-H closed 5 months ago
This can be fixed by using:
game.scale.displaySize.setSnap(pixelWidth, pixelHeight);
However, this can lead to black bars / border depending on resolution.
It ensures the game canvas can only resize to am even multiple of your set width/height, preventing sprites from becoming skewed.
See:
https://phaser.discourse.group/t/scale-game-to-fit-with-snapping-phaser-3/6532
https://newdocs.phaser.io/docs/3.55.2/focus/Phaser.Structs.Size-setSnap
I don't really want to implement this here, because due to my dimensions this snap adds too much border around the game, and the game window too small.
Broken
Smooth: