I was wondering if someone could give me a detailed explanation on how to run a game/app developed using Pygame on an Android phone. I recently finished programming PacMan and it works perfectly on my computer, but I think it would be awesome if I could get it running on my phone. I tried following the instructions at http://pygame.renpy.org/android-packaging.html, but every time i run "import android" on the IDLE I get an error saying it did not find the module. Could someone clearly explain how to set up the android module?
Also, in my program I used code such as if (event.key == K_UP or event.key == K_w): direction = UP. However there are no arrow keys on a phone. What code would I need to use to see if the user swiped the screen with their fingers from up -> down or left -> right, etc.
Any help would be great. Thanks <3
Yes, Python can be used for creating any type of apps that you see on play store. There is Kivy framework for Android app development. Some kivy apps already available on Google Play store see kivy - Google Play .
I was always fascinated by the ol' style pixel art games made by pygame though I wouldn't want to limit myself there. Contrary, Kivy is a more polished framework + the ability to make games. If you want to makes on mobile go with mobile development platforms or in some cases things like React Native.
In this article, we will see how we can make a simple app with Pygame. Pygame is a library for python that helps us to build multimedia applications (Apps) and games. This library works as a wrapper for Simple DirectMedia Layer (SDL).
There is a pyGame subset for android. However this requires special reworking and changing the program. Hopefully it will not be to hard.
http://pygame.renpy.org/writing.html
http://pygame.renpy.org/index.html
However about your second question i am unable to awnser because I am Not yet experienced enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With