Open FormularSumo opened 2 months ago
Turns out this is also a problem on some desktop devices (most laptops), just not as noticeable. My laptop has an 1800p tall display, but the css pixels is 900p - which correspond with OS device scaling of 200%. You can see in this recording that the web version (both Firefox + Chrome) is noticeably blurrier than native (even though native is only rendered at 1080p then upscaled).
https://stackoverflow.com/questions/53233096/how-to-set-html5-canvas-size-to-match-display-size-in-device-pixels https://web.dev/articles/canvas-hidipi Seems like the solution. I have yet to get it working yet though, as it seems like love.js is doing some of its own canvas resizing :/
https://web.dev/articles/device-pixel-content-box also exists but is a bit more complicated and doesn't work on Safari yet.
Instead of the device's hardware resolution being used for Love2D/Canvas rendering, its virtual web one is. This means on modern Android/iOS devices it runs at around 1/2-1/4 of the resolution it should and looks really bad. Sometimes even making it hard to use interact with the game eg reading text.