[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame for Android



On Mon, Dec 6, 2010 at 10:49 AM, Stuart Axon <stu.axon+pygame@xxxxxxxxx> wrote:
Wow, super cool Â- ÂI guess it has python inside it?
Is it now possible to make android apps with python like this ?

Yes. The basic strategy is to use JNI to communicate between Python and Dalvik. libpython2.6 is distributed as part of the package, along with pygame.Â

For now, the launcher is an app that runs code it finds on the sdcard. At some point, I'll try to add the ability to bundle the launcher and a project together as a single app. (This is made a little difficult by android changing the names of certain classes it generates based on the name of the application.)


On Mon, Dec 6, 2010 at 11:16 AM, stas zytkiewiczÂ<stas.zytkiewicz@xxxxxxxxx>Âwrote:
Are you planning to eventually port the pygame.mixer ?

I'm not sure what the strategy for this would be. At the very least, I'll document the sound playback code I have now - and perhaps I'll try to write aÂcompatibilityÂlayer.Â

Renà Dudfield wrote:
It would be good to merge your changes in to pygame subversion. ÂDo you already have subversion access?

I don't, but I don't think it's necessary - there weren't any changes to pygame required. Once SDL and Python work on a platform, pygame works as well.


I've released a version 0.2 to:

ÂÂ ÂÂhttp://www.renpy.org/android-test/pygame_for_android-0.2.zip

(Let's retroactively call the first version version 0.1.) This fixes a local reference leak in the sound code which would cause a crash after 255 sounds were played. I've also put the source code up at:

ÂÂ Âhttps://code.launchpad.net/~renpytom/renpy/pygame-for-android

Well, this is less source code, and more a collection of build scripts and various other project files that are required to convince everything to cross-compile and play well together.