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

Performance is terrible on Android if canvas flag = true #42

Open
FormularSumo opened this issue Apr 17, 2021 · 0 comments · May be fixed by #46
Open

Performance is terrible on Android if canvas flag = true #42

FormularSumo opened this issue Apr 17, 2021 · 0 comments · May be fixed by #46

Comments

@FormularSumo
Copy link

Running this code:

function love.load()
push = require 'push'
push:setupScreen(1920, 1080, 0, 0,{
fullscreen = true,
})
font50 = love.graphics.newFont(50)
end

function love.draw()
push:start()
love.graphics.print({{0,255,0,255}, 'FPS: ' .. tostring(love.timer.getFPS())}, font50)
push:finish()
end

on a Huawei P20 Lite results in an FPS of 15. Running it on a Nokia 6, 36.

For a more real world example running a game I'm making on those phones gets about 10 and 13 average FPS respectively and feels really choppy and laggy. Even my much more powerful/modern Pixel 4a can only get 54 in some situations.

When I set the canvas flag to false in push:setupScreen performance suddenly increases massively. All those phones are able to run the test code and my game at a steady 60 FPS (only dropping when loading things) and feel really smooth and responsive, like they do if I don't use push.lua. On the Windows devices I have my game gets a locked 60 FPS so I can't really tell if disabling canvas makes any difference. I think GPU usage falls a bit in task manager but it's negligible. However on Android this is a real issue, as canvas is set to true by default and most people won't realise turning it off makes a difference. I only did because I was going through all of the arguments you can supply to push:setupScreen to try and fix my game's lackluster performance.

Also after discovering the canvas flag I found this post where someone else has had the same issue https://love2d.org/forums/viewtopic.php?t=80738&start=50

@HTV04 HTV04 mentioned this issue Aug 31, 2021
@HTV04 HTV04 linked a pull request Jul 13, 2022 that will close this issue
@HTV04 HTV04 linked a pull request Jul 13, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant