Pygame on Android

I was wondering if anyone could give me a detailed explanation of how to launch a game / application developed using Pygame on an Android phone. I recently finished programming PacMan and it works fine on my computer, but I think it would be great if I could run it on my phone. I tried following the instructions of http://pygame.renpy.org/android-packaging.html , but every time I run "import android" in IDLE, I get an error in that it did not find the module. Can someone clearly explain how to configure the Android module?

In addition, in my program I used code, for example if (event.key == K_UP or event.key == K_w): direction = UP. However, there are no arrow keys on the phone. What code will I need to use to see how the user clicked the screen with their fingers up β†’ down or left β†’ right, etc.

Any help would be great. Thanks <3

+4
source share
3 answers

There is a subcategory of pyGame for android. However, this requires special processing and program changes. Hope this will not be difficult.

http://pygame.renpy.org/writing.html

http://pygame.renpy.org/index.html

However, I cannot know about your second question, because I am not yet experienced enough.

+1
source

, pygame android , , kivy - - pygame Android, Android , , .

+1

, . ( , , !)

.

, MX MY , mouse up , MX MY , .. . ( arctan2).

if, elif, else, , , , , , .

, , , , , .

+1

Source: https://habr.com/ru/post/1542489/


All Articles