4

In a perspective:

The user interface features in kivy is easier to handle, compared to pygame. But, in pygame, it is convenient to manipulate graphics with blit : do blit, then clear all graphics on the surface after finishing an event, then blit again, etc.

It is also more flexible (based on my limited exp. on this), because the pygame activity can be controlled using while and can get info of the events with one line of code.

Is it possible to package a kivy app, that uses pygame module, for Android?

Thanks in advance

1 Answer 1

3

It is also more flexible (based on my limited exp. on this), because the pygame activity can be controlled using while and can get info of the events with one line of code.

It isn't more flexible, just a different API. Kivy's drawing API is much more modern and closer to how drawing with opengl actually works.

Is it possible to package a kivy app, that uses pygame module, for Android?

Kivy used to use a modified pygame backend on Android, which is still available using --bootstrap=pygame when using python-for-android. I think at least some pygame commands worked when this was used, including drawing commands. However, use of the pygame api was never really supported, and the pygame bootstrap is nowadays deprecated in favour of SDL2 - we won't deliberately break it, but it has issues that will probably never be fixed.

1
  • Thanks. Flexible in an angle of : kivy already provide many widget classes or framework, and have to adapt to it, while in pygame we may build from scratch (creative algorithms and logic) so we may move more flexible. But I am starting to get used to it, the blit and clear screen in pygame may correspond to add_widget and remove_widget. So if I import some other modules such as math, numpy, time, will it be able to work on android? I am working on Windows.
    – user7986928
    Sep 24, 2017 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy