TomLGD Posted September 26, 2016 Share Posted September 26, 2016 Hello, I am trying to make a game with phaser 2.2.8. The should look like an old school gameboy game. So the canvas has the dimensions of 160x144 pixels. The problem is a strange behaviour at the left and the top side of the screen. I attached an example to clarify what i mean. On the left pic the pilot wares glasses. You can see the connection between the 2 lenses. On the right pic the sprite looks compressed by one pixel, the connection disappears. Does someone knows why this happens? Or better how to solve this issue? Thanks, Tom Link to comment Share on other sites More sharing options...
TomLGD Posted September 26, 2016 Author Share Posted September 26, 2016 Here is the picture a bit bigger^^ Link to comment Share on other sites More sharing options...
Zendrael Posted September 26, 2016 Share Posted September 26, 2016 I'm having a similar problem... Which is the size of your spritesheet and sprite frame? Is the sprite drawing too close to the border of the frame? Link to comment Share on other sites More sharing options...
TomLGD Posted September 26, 2016 Author Share Posted September 26, 2016 My atlas has a size of 571x571 And yes the missing line happens at the point the sprite is touching the boarder. Link to comment Share on other sites More sharing options...
icp Posted September 26, 2016 Share Posted September 26, 2016 You should disable antialiasing: this.game.stage.smoothed = false; Link to comment Share on other sites More sharing options...
TomLGD Posted September 26, 2016 Author Share Posted September 26, 2016 7 minutes ago, icp said: You should disable antialiasing: this.game.stage.smoothed = false; This is already the case, do difference with dis- or enabled Link to comment Share on other sites More sharing options...
TomLGD Posted September 27, 2016 Author Share Posted September 27, 2016 Just tested the game with phaser 2.6.2. Still the same error, when a sprite is touching/overlapping the border, the sprite will "loose" one line of pixels Link to comment Share on other sites More sharing options...
TomLGD Posted September 27, 2016 Author Share Posted September 27, 2016 Okay guys! Ich think I have some kind of solution! game = new Phaser.Game(WIDTH, HEIGHT, Phaser.CANVAS, 'gamediv', null, false, false); I changed from Phaser.AUTO to Phaser.CANVAS! Thad made the stunt^^ So I hope I dont need webGL stuff for my project... Link to comment Share on other sites More sharing options...
Zendrael Posted September 29, 2016 Share Posted September 29, 2016 Great! If you are not going to use 3D or fancy effects, CANVAS is ok for your game. It's faster on some devices too. Link to comment Share on other sites More sharing options...
Recommended Posts