I’m building rather boring enterprise applications at work and I love creating more appealing things in my spare time, so I do a bit of game development whenever I can. The main problem for a programmer is to get some graphics, but fortunately I have some nice renderings from my old Project E tutorial and the even older Project D game by sechsta sinn on my harddisk that I could put into use (all done by my friend and favorite artist Martin Ernst, btw.).
This is what I managed to do in three after work sessions so far, if you’re interested in the details, continue reading after the video.
I was worrying about my HTC Hero for quite some time now since HTC has repeatedly postponed the overdue 2.1 update and announced that this one-year-old phone won’t ever receive an official 2.2 update from HTC at all. So, I was playing around with my mobile quite often in the last days. Moreover, I watched the Google I/O sessions, including Chris Pruett’s session on Android game development which I mentioned earlier in this blog. These are just two reasons why I finally started coding.
Here’s how I made progress so far.
1. Evening #1, Tuesday, June 23rd. Development environment setup, project setup, starting Activity created, first deployment to Android phone. Read some articles regarding Android gamedev. Collected graphics to use. Decided not to separate rendering and game logic threads for a start. Hooray, let the fun begin.
2. Evening #2, Thursday, June 25th. Implemented a simple game object and component management system. Converted old BMP graphics to PNGs and applied true alpha-transparency. Implemented a scrolling sky and a static glider to have some eye candy. Recognized that the original HUD occupies way too much height and reduced it’s height by 10%. Started implementing glider movement but gave up dissatisfied.
3. Evening #3, Friday, June 26th. Continued glider movement, spent plenty of time experimenting with the sensors, sensor interpretation and control algorithms. Converted more frames for the glider, now featuring special frames for vertical movement. Came up with an acceptable glider movement and created this blog posting and video.
Current status is running with 60 FPS on a HTC Hero. All graphics are rendered with the glDrawTexfOES extension.
My next step will be to create pools for game objects, components and other things which are used heavily during the game, because one thing I learned so far (also from my iPhone game development experience) is that object allocation during game runtime should be avoided. The garbage collector is relatively expensive on my device and causes a break of 100-250ms per call, resulting in a noticeable interruption of the gameplay. After this basis is done as well, I’ll proceed with the glider’s weapons and upgrades, then extras and simple enemies and finally with the full enemy formation processing and level definition. But this will surely take several more after work sessions…
Credits: Graphics taken from sechsta sinn’s original game “Projekt D” and used with permission.