Game becomes blurry and slow,when including viewport params in html file

@Deltakosh @sebavan
Yes i tried adaptToDeviceRatio and Anti-aliasing, on both occassion blur is gone.Now my only concern is that ball horizontal movement on touchmove is slow on fullscreen or if i set width=device-width(in viewport).
Any idea guys.

@Deltakosh @sebavan.
Thanks for you efforts.Finally i found what is going on and have the solution.In my viewport tag ,if the width=device-width is not given (same if the game is not fullscreen),then my canvas size is some strange 980px17…px something.So I was calculating my ball touch movement according to that resolution(980px1780px),that’s why ball movement was slow on fullscreen and viewport is set to width=device-width.(because then canvas will resize into original resolution ,but my calculations are based on initial size).So i included width=device-width in viewport,and then calculate ball movement acording to original canvas size.

Regarding the blurriness,i had to set hardware scaling according to devicePixelRatio(1/window.devicePixelRatio) .This worked for me.

Thanks.

2 Likes

Wonderful!! Thanks for having kept us in touch

I was having the same issue… Thanks for the solution. Can you write the exact line for that:
devicePixelRatio(1/window.devicePixelRatio)

I might sound stupid but Im not able to write it correctly without having any issues…