Battle Shock

Check out Luna Sea Games to see the iPhone version of Battle Shock in the AppStore now.

Tuesday, November 23, 2010

graphics up!


It's always refreshing when you first get a graphics loop going. Especially when there is so much going on. There really wasn't much too it.

I started with the SanAndreas java shell in $(androidndk)/samples/san-angeles. This creates just a basic Activity, creates an GLSurfaceView derived view, and assigns a GLSurfaceView.Renderer derived render with overloads for onSurfaceCreated, onSurfaceChanged, onDrawFrame. Next call our native versions of each of these and the graphics loop is going!

I did struggle with the file io from native code. I don't have a great solution yet and there seems to be some debate about the best practices here. It appears that files are stored zipped in the apk and must be unzipped if accessed directly from c. It's also a struggle to get a file descriptor down to c.. let alone call java code from c.. which I haven't figured out. For now I took the lazy way out. I put all my files on the sdcard under /sdcard/BattleShock and just did standard c fopen to access them. This works fine, but is no way to ship an app. All your source is just laying around for someone to tinker with. Then again.. that's what they do on a pc? Well, if it comes to that I will pack all the files in a single packed file.

I started to get a little worried about binary compatibility with other android phones. I'd like to test a few. I have a Droid X and an HTC Incredible. Both of these are second generation android phones. After watching Real Time Games for Android Redux it made me want to target 1.5 and 1.6 phones. They appear to be the majority of the market. I emailed Verizon asking for development phones and they politely sent me to google. It appeared the google was out of their development cache of phones. I spent some time on ebay and even bid some on some phones with smashed screens, but I got outbid! Seems like 1.5 and 1.6 phones are still going for @$200. I'd like to get a few, but don't have the budget.. what to do?

No comments:

Post a Comment