[solved] example request , canvas scale - camera - pixel perfect - simplified

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: [solved] example request , canvas scale - camera - pixel perfect - simplified

Post by ReFreezed »

You could PM a link to a download.
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
gcmartijn
Party member
Posts: 136
Joined: Sat Dec 28, 2019 6:35 pm

Re: example request , canvas scale - camera - pixel perfect - simplified

Post by gcmartijn »

darkfrei wrote: Wed Mar 02, 2022 10:05 am
gcmartijn wrote: Wed Mar 02, 2022 10:01 am Is it better to use this in my case? Don't know what it does exactly.

Code: Select all

    t.window.usedpiscale = false -- Enable automatic DPI scaling (boolean)
    t.window.highdpi = false -- Enable high-dpi mode for the window on a Retina display (boolean)
I think that it has no effect by upscaled canvases.
I know this is an older thread, but it is important to know for others that are reading this topic that you need to set

Code: Select all

    t.window.highdpi = true -- Enable high-dpi mode for the window on a Retina display (boolean)
I'm using a Mac M1 with love 11.5 and when I was moving the camera to the left and I see some glitches when t.window.highdpi = false.

This one is not needed (I hope).
To say it simple, when you set this one to true, you get a super small font because it is using the super high resolution that the Mac is using.

Code: Select all

    t.window.usedpiscale = false -- Enable automatic DPI scaling (boolean)

-- this is now unreadable small
    love.graphics.print("FPS: " .. tostring(love.timer.getFPS()), 10, 10)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 182 guests