Berzee Posted December 5, 2013 Share Posted December 5, 2013 Hallo friends! I am new to Phaser (coming over from Flixel) and having fun with it, but still learning to cope with the usual HTML5 "blur all the things!" problems. I've made sure to initialize Phaser.Game with antialiasing set to false, but I'm still seeing some blurry pixels in certain cases. Here's my test game: link[WASD to move around, click to throw the ball at the mouse cursor, touch the ball to pick it up again] What I've noticed is that sometimes the ball still blurs like this: It seems to be caused by the ball's X and Y positions not being integers, because I can fix it withball.x = Math.floor(ball.x)ball.y = Math.floor(ball.y)but I don't want to do that every frame if I don't have to because I don't know if it will mess with the physics, and because it seems like I might just be missing some other no-blur rendering option. I seek your wisdom!(P.S. Let me know if the test game above has too much superfluous code, and I will build a cleaner example of my problem. ) Link to comment Share on other sites More sharing options...
rich Posted December 5, 2013 Share Posted December 5, 2013 Yeah I've got this as an optional flag in the 1.1.4 version currently in dev (to round-up all pixel values on rendering). It only works on Canvas mode though, not WebGL, but still gets rid of problems like the above. At least until you scale your game window anyway Link to comment Share on other sites More sharing options...
Berzee Posted December 5, 2013 Author Share Posted December 5, 2013 Ahh, good good. I was hoping there would be something like that, a rendering-logic-only way of making everything crisp and delicious. I will await eagerly the arrival of 1.1.4 (or see if I can dredge up the initiative to grab the dev version =). Link to comment Share on other sites More sharing options...
Recommended Posts