I am developing a mobile game for Android in Python using PyGame. So for debugging purposes, I have often used PyDroid, which is basically a mobile IDE for editing Python code on an Android mobile device. It also allows me to run the whole app in Python, since it also includes a working interpreter.
The app runs around 60 FPS with no problems (it's a simple 2D platformer, nothing very sophisticated).
When I build the application via Buildozer (using the procedure discussed in this answer), I am able to obtain an APK using the buildozer android debug
command. When I install the APK, it works perfectly except for the frame rate: it's always around 30, never able to reach the same performance I see with PyDroid!
I would like to understand why this is happening. What is the difference between compiling the APK via Buildozer, and running the application on PyDroid? Is there a way to emulate exactly what happens on PyDroid also using Buildozer? Is there something I am doing wrongly? How can I improve the performance of the generated APK?