Nov/10

4

Agent Matt

Slides from a recent android development talk

This is just a quick post to share the slides that I put together for a recent talk I did on porting an iPhone game to android.

And here they are:   Slides from the JNI_presentation

Some resources I’ve found invaluable when developing for android…

Game Dev (Textures / Assets / Saving): http://www.philhassey.com/blog/2010/08/03/porting-galcon-using-the-android-ndk/

JNI Specifics (Getting the JVM, attaching threads) : http://android.wooyd.org/JNIExample/

Debugging JNI (how to use NDK-GDB): http://vilimpoc.org/blog/2010/09/23/hello-gdbserver-a-debuggable-jni-example-for-android/

I might come back here and add some more detail later… stay tuned 🙂

Be Sociable, Share!

RSS Feed

3 Comments for Slides from a recent android development talk

Sam | November 4, 2010 at 5:27 pm

Hey great, thanks for this! I’ve been thinking about doing some iPhone dev in my spare time, and thought it would be nice to do a cross-platform game for iPhone and Android. Is it really a massive pain in the ass? Do you have to have a Java wrapper for everything? Can you just have the main method in Java and then transfer control entirely to native code? That way you could share mostly the same code base, and just have some defines to switch platforms.

How do you handle the different OpenGL capabilities of various devices? Is it as painful as doing a PC game? I’ve been doing console dev for five years now and haven’t had to worry about that for a while.. it’s nice 😉

Agent Matt

AgentMatt | November 5, 2010 at 9:37 am

Hi Sam,

The biggest pain in the ass is just trying to debug the application – ndk-gdb is patchy at best.

I didn’t look into putting the main renderloop inside native code and creating and controlling the GLContext from there, instead I took the easy route of using the GLSurfaceView which provides it’s on onDraw callbacks and onTouchEvent etc. The biggest problems with this method is getting access to the GL context outside of the onDraw callbacks.

98% of our codebase is still in c++. Any java is limited to LoadTexture() PlaySoundEffect() Music() etc…

Handling OpenGL capabilities is a whole ‘nother kettle of fish. Some games download the relevant compressed textures for whatever device they are started on. Our approach for now is to target the best subset of supported devices we can.

Todd | March 26, 2011 at 11:18 pm

Great slide presentation, love the candid nature and great technical articulations. You guys really have a winner with this game, but I could have told you that at the Milton Rd Hoody drinks that night, hey Tom? 😉

Blog needs updating with where you guys are heading now, just in case you’ve decided to go all overly selective with publishings :<

Leave a comment!

«

»