August 18, 2011

Python on Android

Did you know  that Android is base on a Linux kernel? And I think almost all Linux for PC-s has a built in Python. So let's put Python on Android and have some fun. :) But how to do that? First you need a SL4A (Scripting layer for Android) on your system. SL4A is like a shell and the next step is install Python or any other program language engine. See more information in the main website. After some minutes/hours/days of work you can write and run Python scripts on your mobile device. If it's not enough disco to you, you can add Python subset for Android too. And make games and earn a furtune with them throught Android Market. For example here is my previus Prince of Darkness game ported to Android. I made some changes in intefaces to be more cool looking on Android, and slightly change gameplay too (and you can still run it on an avarage PC). If someone could help me how make an .apk file from it please discous it with me.
Hints:

  • Both SL4A and PS4A is on the Market, you can download them. If not, use websites download areas.
  • If you use Pygame Subset for Android 0.9.3 don't forget to add android.init() to the code else touchscreen won't work. I spent 2 days with this problem...
  • You don't need to have a Android mobile device for these things, they are run on Android emulator too. I developed my game on it.

No comments:

Post a Comment