Sunday, February 12, 2012

Episode 3 - A foray into Android-Land

Android is awesome!

After my first baby steps into the Android Tutorials, I now took the next step and managed to deploy a home brew Hello World Android application from Eclipse (ADT) onto my physical Samsung Galaxy SII phone. Things just got real!

Getting this to work involved installing Samsung Kies on the laptop, as it seems the only way to get the correct USB drivers. The hardest part was to actually get access to the Kies download from the extremely "helpful" Samsung website.

The debugging experience on the physical device is great, much more responsive than the emulator. Once in a while I do need to restart Eclipse because the debugger will not connect to the device... but even then I can still run on the device, and logging works fine. All in all, not too bad.

Debugging OpenGL ES 2.0 is not awesome!

I'll be making games on android, and for that I'll need sprites. And for performant (yes, I'm aware that is not a real word) sprites, I'll need OpenGL. According to the Device Dashboard, ES 2.0 is very wide spread amongst current Android devices, so it's a safe bet to require it.

Now, I've spent the last couple of years doing mostly DirectX, and I'd forgotten how poor the debugging experience of OpenGL really is... especially on the android device. First of all, you don't get to use the emulator if you want to use ES2.0. Then, everything fails silently without so much as a return code, so the only way to pin point silly mistakes in the calls is by liberally sprinkling your code with glGetError-based checks... and even then the errors reported are not very informative. How about proper GLSL debugging? When hell freezes over, probably.

After a fair bit of sweating and cursing, finally I got the first textured quad up and running... free drinks for everyone!

Now my fingers are itching to abstract away the big fat pile of OpenGL calls it took to get this far. I am trying to focus on moving forward and stay way from over-engineering, but man... talk about a high barrier to entry for new programmers! No wonder the internet is full of badly copy-pasted malfunctioning code fragments.

Misc
- As usual, the freshly installed GIMP insisted to have a Dutch User Interface... because I use Dutch formatting in the Windows Regional Settings. This annoys me every single time I run a GTK application, that is not how locales are handled in Windows. Please show some respect for my platform, guys! Rather than overriding the locale through a LANG environment parameter (again... not how things are done in a Win32 environment), I simply deleted the NL folder from [GIMP Install Folder]\share\locale. Works like a charm, and this way I'm pretty sure it will not revert to Dutch anytime soon.
- Learned how to take proper Android screenshots using Dalvik Debug Monitor (ddms.bat). Tried to spice them up with a Android Phone Template .PSD, but the end result looked too cheap and cheesy. Pure screenshots it is!

5 comments:

  1. Wow, What an Outstanding post. I found this too much informatics. It is what I was seeking for. I would like to recommend you that please keep sharing such type of info.If possible, Thanks. Text Auto Reply

    ReplyDelete
  2. Thanks so much for this information. I have to let you know I concur on several of the points you make here and others may require some further review, but I can see your viewpoint. Drive Safe

    ReplyDelete
  3. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. Best Coding Android Wallpapers

    ReplyDelete
  4. I have been impressed after read this because of some quality work and informative thoughts. I just want to say thanks for the writer and wish you all the best for coming! Your exuberance is refreshing. what is iot hidden menu

    ReplyDelete
  5. I couldn't agree more with your points. Well-written as always! Sex Games

    ReplyDelete