Porting to Android: NDK strategies, etc. |
jlunderville
|
In case it's not clear, if I do end up working a different porting strategy, I'd like to get my code back into the SDL mainline so everyone can benefit (and I'm not alone in maintaining it...).
Specifically it seemed to me that for compatibility, it would be desirable to run the audio, input, and haptics through JNI. A little tedious, but very straightforward. I heard people talk about an SDL_mobile API for handling save/restore state, which seems like a great idea too. I had an idea that it should be possible to make use of the GLSurfaceView by running an extra thread for the app's main() and etc.; it starts up suspended, and gets woken up every time onDrawFrame is called. When it's done rendering, the flip() function puts the thread back to sleep and wakes the GLSurfaceView up (I'd actually want to implement this using something like setcontext() to avoid poking the kernel unnecessarily, but hopefully you get the gist). Any comments on either of these? Am I just overthinking the problem? |
|||||||||||
|
Nathaniel J Fries
|
There is already a GSoC project for a port to Android.
Using that and providing any assistance possible to the student working on it would the best way to meet both your goal of getting your SDL game on Android and with your efforts assisting the rest of those using SDL. As for SDL_mobile, that's not something that's actually been coordinated or anything yet, just a recommendation. Who knows if and/or when that will ever happen. Realistically, it will at the very least need both an Android and an iPhone developer to coordinate together. MichelleC seemed very interested in making SDL more useful in iPhone development, so maybe you should speak with her. And as always, I am very willing to make recommendations on the API and (where possible) suggestions on its implementation. I've never developed for either device and definitely lack the time to learn either right now, so I'm afraid I wouldn't be much help beyond commenting on the API. |
|||||||||||
|
jlunderville
|
Indeed. I tried to get in touch with the person working on it a couple days ago, but I'm not sure if they're reading email at the address I sent to, because I never got a response. I was kind of hoping that I'd be able to get in touch with them by posting here.. |
|||||||||||||
|
Porting to Android: NDK strategies, etc. |
Vittorio G.
Guest
|
i'm too quite interested into the iphone port, and i take advantage of
this post to remind of a couple of bugs ( http://bugzilla.libsdl.org/show_bug.cgi?id=1025 http://bugzilla.libsdl.org/show_bug.cgi?id=1027 http://bugzilla.libsdl.org/show_bug.cgi?id=996 http://bugzilla.libsdl.org/show_bug.cgi?id=1026 ) which should be really neat to look at (or at wrost just take the patch and apply it) bye Vittorio On Thu, Jul 29, 2010 at 2:09 AM, Nathaniel J Fries wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
jlunderville
|
An update on this in case anyone actually cares: I did manage to get in touch with Paul, and it turns out that the porting strategy is pretty much as above (except the parts that don't make sense). Things seem to be in pretty good shape; video, audio, and keyboard support are all sort of alpha-level, basically working but with caveats.
|
|||||||||||
|