Skip to content

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

Description

@FormularSumo

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions