Hi again, today I messed around with porting one of my old games to Pygame Subset For Android (PSFA).
woot! I only had to change a few things so far. That's to just get through the intro, and through two menu screens into the main game. - replaced my usage of UserList, with subclassing from list directly. - .tga files don't seem to load (so I just exported them as .png). - htmllib is missing, so I'll have to use some other html parsing method I guess. I haven't tried compiling PSFA itself yet, I just use the `adb push ...` to copy the files whilst the device is in debug mode. Is there a way to get that to only copy the files that changed? Since this game has a heap of files... it takes a while to transfer each time I want to run a change. cya, ps. thanks for PSFA, it's heaps of fun! On Wed, Feb 23, 2011 at 10:09 PM, René Dudfield <[email protected]> wrote: > Hey, > > Thanks for your help. > > I noticed on my device, there is a /dev/video0 file when the webcam is > enabled. I don't know if we can access that file either, but that's the one > we'd need to open and read from. So I'm hopeful we can use the standard > linux camera module. > > It's still downloading all the sdk stuff, so I'll give it another go > tomorrow. > > Your ideas of including other packages by selection are good :) > > Cross compiling with python you can usually set environment variables > CC=arm-gcc-platformblabla etc and then run setup.py. No idea about this > android python though. numpy has worked on arm before... so maybe it's > possible. > > > cu! > > > > > On Wed, Feb 23, 2011 at 9:03 PM, Tom Rothamel <[email protected]> wrote: > >> >> >> On Wed, Feb 23, 2011 at 5:24 AM, René Dudfield <[email protected]> wrote: >> >>> Do you build it on ubuntu? If so, what packages do you need to install >>> to package it? >>> >> >> Yes. From Ubuntu I grabbed the jdk and ant, while I downloaded the >> android-sdk and android-ndk directly from google. >> >> If you're not using 64-bit ubuntu, you'll need to compile python 2.6.4 and >> copy the python and pgen binaries into Python-2.6.4 as hostpython and >> hostpgen, respectively. >> >> Is there a way to install it without the market? My cheapo tablet doesn't >>> have the market on it yet(without a hack), since it's still android 2.2, and >>> apparently they're not supposed to put the market on 2.2 with 10 inch >>> screens. I guess I can just build packages which include pygame for people >>> to download manually. >>> >> >> Two ways (both of which require you to enable "Unknown Sources" on the >> Applications Settings screen): >> >> - You can just download the .apk file using the web browser, go into >> downloads, and choose it. That should install the app. >> - Once you have the sdk set up, you can connect to the computer and run >> "adb install -r app.apk". (This also requires you to enable U >> >> >>> Is the web cam supported? I'd guess not. My device has one, so it'd be >>> neat if it was working. I wonder if we can use normal linux video interface >>> (then we can use the code included in pygame already) or if we'd need to use >>> some other API. >>> >> >> I don't believe that the NDK supports accessing the camera directly. So >> we'd probably have to use JNI to access the camera. >> >> >>> What do you think of including other common game modules? For example, >>> numpy, pybox2d ( http://code.google.com/p/pybox2d/ ), pyaudio, etc. >>> >> Is there a chance to get ctypes working? Or is that not possible with >>> the python? >> >> >> It probably makes sense to have a way of including these modules, if they >> can be cross-compiled. With the new model (where each application ships with >> its own copy of python and pygame), it probably makes sense to have a way >> for people to choose which modules should be included. That's what I'm doing >> with the Ren'Py-specific modules. >> >> At the same time, convincing Python to cross-compile is something of a >> challenge, since there isn't a supported way of doing so. >> >> >
