my current game scales up/down and so does the background which should be stretched.
The problem is that it flickers from time to time. I cannot figure out what causes this issue and it’s different on different computers. Sometimes it appears when the browser is maximized, sometimes at specific sizes. It does not always occur but like 80%.
Then, I was told that there a several stripes throughout the complete backgrounds images.
I initialize the Phaser game with window.innerWidth and window.innerHeight, then scaling the world based on a factor I compute.
Could you guys give me some hints on where to look for the problem? Are there any requirements for images used? I couldn’t find anthing in the documentation or on the WWW that would have helped me.
I do nothing. Just start the application and then it flickers. It’s not really flickering, it’s more like wiggling some pixels in all directions (right, top, bottom, left).
Can this be a scaling issue?
I initialize Phaser with window.innerHeight and width and then in state, I have a fixed height and width. I compute a factor and set the game.world.scale.x/game.world.scale.y. The factor is mostly computed by
game.world.scale.x = DESIGN_WIDTH/newWidth;
where newWidth is the width of the world and DESIGN_WIDTH is the window.innerWidth.
It occurs when I run the browser in full screen at the laptop or at some specific dimensions (it’s not a responsive game, so I have to reload the game if I change the size of the browser. I did not implement a listener as it’s unusual to resize a game on mobile).
At another PC (not laptop), it does not flicker at full screen (browser).
I don’t know what could cause this issue and even how to look for it.