Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

push starts game scaled, fonts render strange, resize breaks virtual resolution #18

Closed
coltonoscopy opened this issue May 4, 2018 · 2 comments

Comments

@coltonoscopy
Copy link

Hello!

First wanna say this library is great and has been an amazing tool to have throughout the 10.0 lifecycle :) So thank you so much for the awesome work you've done with it!

Transitioning to v11 now and noticing some issues in using push with a very simple example:

VIRTUAL_WIDTH = 384
VIRTUAL_HEIGHT = 216

WINDOW_WIDTH = 1280
WINDOW_HEIGHT = 720

gFonts = {
    ['small'] = love.graphics.newFont('fonts/font.ttf', 8)
}

function love.load()
    love.graphics.setDefaultFilter('nearest', 'nearest')
    love.graphics.setFont(gFonts['small'])

    push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, {
        fullscreen = false,
        vsync = true,
        resizable = true
    })
end

function love.resize(w, h)
    push:resize(w, h)
end

function love.keypressed(key)
    if key == 'escape' then
        love.event.quit()
    end
end

function love.update(dt)

end

function love.draw()
    push:start()
    love.graphics.print('Hello, world!')
    push:finish()
end

In running this with LÖVE 10.2, I get the following expected screenshot with push:

image

However, when running Version 11.1, I get the following:

image

Notice that the second one is much more zoomed in than it should be, the font being blurry, and when you resize the game window in 11.1, it ends up going to the window's resolution rather than the virtual resolution. Not sure if there's a LÖVE feature I'm missing with the new update or if it's an issue with push, but if you have any ideas it would be much appreciated :) Thanks so much!!

@Ulydev
Copy link
Owner

Ulydev commented May 6, 2018

Hello, @coltonoscopy ! Thanks for the kind words.

I have noticed these problems with the transition to v11 too, I wonder what are the breaking changes introduced in this new version. I'll be sure to look into it asap! If you have any ideas in the meantime, please let me know.

@Ulydev
Copy link
Owner

Ulydev commented May 7, 2018

Fixed in db9213b.
Tried only on macOS, but it should work on other platforms too. Please let me know if you encounter any issues :-)

@Ulydev Ulydev closed this as completed May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants