Friday, May 22, 2009

Robotic Space Rock 1.0.10 for android 1.5 (cupcake)

Since the release of the android 1.5 SDK, I wanted to update the code of RSR to use the 1.5 SDK. It seems that as far as openGL/ES is concerned, programming is greatly simplified by the introduction of the class GLSurfaceView and the Renderer interface. It only took me a couple of hours to change the code to use the new programming interface. However I spent several days trying to find out why my application misbehaved when it was paused and then brought back to life. However I was able to track the problem down using the setDebugFlags(DEBUG_CHECK_GL_ERROR);
It had to do with incorrect rendering of a square (used for the moon/earth) surface. I also replaced the mediaPlayer class I was using to play back an mp3 with the JetPlayer class, which can be used to play back midi files that are a lot smaller compared to mp3's and they can use little cpu power. Now a midi file is used for playback, and the application size has reduced considerably to well under 1 Megabyte. However I did not find the time to write a proper midi song, so all you gonna hear is a repetitive ditty that is probably gonna drive you crazy...
Overall I think that the game is now a lot more responsive and fast but I only tested it on the emulator, so your feedback is welcome. Go to http://code.google.com/p/monolithandroid/downloads/list , download roboticspacerock1.0.10beta.apk and keep those bug reports coming...
The 1.0.9 version did not work, probably due to the getHolder().setType(android.view.SurfaceHolder.SURFACE_TYPE_GPU);
bug. In order for the game to work in real phones it seems that you still have to use the previous line.

Friday, May 1, 2009

New! Improved! The 1.5 android SDK is here.

The android 1.5 SDK (based on the notorious cupcake code branch) is here and it is what the first release of the SDK should have been. Support for sound recording and playback through buffer manipulation (using the AudioTrack class) is something that game developers want. And easier OpenGL programming is now easier, too. However there are still spotty places. It seems that the new SDK broke a lot of programs, especially games. And the apk size limitation of 16 MB still holds. My application RSR kinda works but when you try to exit it, it freezes. So I will have to adapt it to the new SDK release. I will rewrite the openGL parts using the new classes and see what happens. Maybe I will try to use AudioTrack class, too...

Search the web