Windows 10 resolution errors

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
tonibm19
Prole
Posts: 4
Joined: Fri Aug 28, 2015 3:35 pm

Windows 10 resolution errors

Post by tonibm19 »

I wanted to adapt my love game to 1080p.
Upscaled background to 1080p and all well.
I also put a love.window.setMode to fullscreen and 1080p.
But, its displayed like if it was zoomed. And I noticed if you lower the windows 10 "upscale apps and text" from 150% to 100% it works fine.
Anyway to prevent this?
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Windows 10 resolution errors

Post by slime »

LÖVE (and SDL, which LÖVE uses for window and input functionality) doesn't properly support DPI scaling in Windows at the moment.
tonibm19
Prole
Posts: 4
Joined: Fri Aug 28, 2015 3:35 pm

Re: Windows 10 resolution errors

Post by tonibm19 »

So sad :(
Is there anyway to know if the OS is windows 10 at least?
tonibm19
Prole
Posts: 4
Joined: Fri Aug 28, 2015 3:35 pm

Re: Windows 10 resolution errors

Post by tonibm19 »

Also, what about next version?
Any plans to support dpi scaling?
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Windows 10 resolution errors

Post by Jasoco »

I find it much easier, and less forceful for the user end, if I draw the game at its native resolution no matter what, resize the window to the native resolution using fullscreen desktop mode and use push, scale, translate and pop to scale it up instead of actually changing the resolution of the display. I hate games/apps that take over the display and change the resolution. It's 2015. That's not needed anymore. Just draw native, use the full screen size and scale the picture itself.

I've posted code to help so many times on this forum. You just need a little math to figure out the scale value and x and y offsets for the picture. Maybe also a bit of setScissor-ing to make sure nothing draws outside when the aspect of the game is different from the aspect of the display.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Windows 10 resolution errors

Post by T-Bone »

What Jasoco said. Be resolution independent.

It's good to try running your game in a variety of resolutions to make sure it works everywhere of course, so just lowering "upscale apps and text" is good enough for testing.

Mac OS High DPI support was added fairly recently I think, so I assume Windows support is coming.
User avatar
CoffeeCoder
Prole
Posts: 19
Joined: Sun Aug 23, 2015 4:10 am

Re: Windows 10 resolution errors

Post by CoffeeCoder »

tonibm19 wrote:I noticed if you lower the windows 10 "upscale apps and text" from 150% to 100% it works fine.
Just piping in to say, I believe the recommended upscale percentage is 125%, have you tried that? It may still look blurry and zoomed in but still clearer than it would at 150%!

I do agree with Jasoco too, in this day and age it's better to be resolution independent. Sure, test your games on various displays if you can, but generally if you make it for your native resolution it should still look good on other resolutions. And remember that if you start at a HIGHER resolution (like 1440p), you can always scale DOWN and it will look better than starting at a lower resolution and scaling up. I know this from personal experience, when I was first into game development I made a 16x16 tile in Paint and tried to scale it up to 32x32 after I deemed it "too small" for the project. Suffice to say I learned that the hard way, now I go the opposite and make my tiles at 64x64 and scale down if I need to. :P
- CoffeeCoder
Visit my site to learn more about me! :megagrin:
tonibm19
Prole
Posts: 4
Joined: Fri Aug 28, 2015 3:35 pm

Re: Windows 10 resolution errors

Post by tonibm19 »

Thanks, i managed to get it working.
Its addapted to background y.
But I would like to implement y scrolling, and this way I cant.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 9 guests