Home | Posts RSS | Comments RSS | Login

The Second Test is out

Saturday, December 4, 2010
I forgot the packaging key of my first test, so I have to unpublish the old one and create a new application. Android market doesn't allow me to remove the old one. How stupid this market is.

Ok, I have just released my second version after three days of hardworking. I have a long list of what I have changed. Although the there is still the balancing problem, this version is much better. (Interesting, someones complain that the game is too hard while some other people complained it is too easy.)

Recent changes:

You can activate a help dialog with details about everything.
Fixed the auto-sell problem of the upgrade dialog.
Revised the upgrade tree.
Can now save some player's info.
Display level achievements.
Level selector now shows level info.
Applied a little offset to the tower cursor when building a new tower, so that the tower won't be covered by the player's finger tip.
Add few sound effects.
Eliminated enemy shifting due to tower building.
Sort enemy and tower order based on depth.
Solved the flashy problem when spawning enemy.
Stopped event handling when game screen fading in and out.
Downgrade the minimum os requirement to 2.1.
Use 30 frame rate.

And many other stuff...

What's Next:

Create different AIs.
Keep adjusting balance.
Enable tower research.
Create more levels.
Add sound effects to enemies and towers.

New level delector and more

Thursday, December 2, 2010
I have some free time this week to keep working on Tower Commander. Thanks to my testers, I now have a list with at least 20 issues. The most tricky problems are the white screen bug due to text message interruption and the sound engine.

For the first one, I know the reason is that the OpenGL context gets lost if you switch to another application. But I think I have already handled that problem. I used to have white screen problem if switch out the application by pressing the home button and then switch back in. But it seems the problem is solved in this case. I don't know why text message will cause me trouble.

As for the sound engine, I finally found a good way to code it yesterday. However after I assigned sound effects to the gun towers, things got mad. Too many sound streams are mixed at the same time, and it is hard to hear clearly the gunshot but some noise. I have to figure out a way to organize the sound effects.

During the past few hours, I have added an exit menu activated when you press the back button. This menu kills the game activity. Before, the only way to switch out the game is through the home button, which doesn't really kills the game but "minimize" it. This may draw a lot of battery power. In speaking of battery life, I don't like the architectural design of the Android platform. There is no way to completely kill the application when it exists. Some parts of the program always run in the system. Like for example, after you finish an activity and rerun it, you will see what you allocated in the C++ code is still there.

To save more power, I also slowed down the frame rate and cleaned up some logic. As for the UI, now the Level Selector can show some details about each level.

Some good places to start Android game programming.

Tuesday, November 30, 2010
I won't recommend Java for writing Android games. Not only because C++ is my native language, but also because of performance concerns and easy portability. However, existing documents about developing Android applications with C++ are rare and brief. Here are some good resources I found:

The official NDK doesn't support many C++ features, such as exception and STL. Although you can solve this problem by compiling STLPort, you may also want to check out CrystaX NDK. This one has everything you need to write a C++ program for Android. http://www.crystax.net/android/ndk-r4.php

Game related libraries can be found here http://code.google.com/p/rokon/ and here http://www.badlogicgames.com/wordpress/. The Rokon engine was the one I used to write the first version of Tower Commander. But at that time, this Java engine was buggy. Later, I quit using it to embrace C++. Badlogic Games seems to be the official site of the game engine libgdx. That website has a lot of things about Android game developing. At least the physic engines of these two libraries are now using C++.

To use Android NDK, you will have to get yourself familiar with jni. There are few good open source projects out there that has examples for almost every jni features. The first one is the SDL port for Android: https://github.com/pelya/commandergenius . You can learn how to write Android.mk from this project. And of course, if you are familiar with SDL, starting your game from this project is a good idea. Also, the kwaak3 project http://code.google.com/p/kwaak3/ is a quake 3 port to the Andorid platform. It is also a very good textbook of learning jni and the NDK.

Replica Island is also worth mentioning, if you intend to start your game with Java. http://replicaisland.net/  This is so far a very good, if not the best, platform game on Android.

First post and First demo

Monday, November 29, 2010
As required by the Android Market, I need to maintain a web site about the app. So this is it.

I have released mya first test of the game "Tower Commander" to the Android market last weekend. I wasn't really sure about releasing it at its early stage, because if the rating gets too low, it's hard to get back. Although I stated that it is just an inner test and not recommend for players to download, I have gained 400 new users in the first two days. Some warmhearted people even emailed me suggestions and bug reports. Thanks to all of you who downloaded the game!

I know that there are a lot of issues that I need to solve. There is a white screen problem if the game gets interrupted by a text message. And there is no sound effect inside the game. And, of course, the level design is too simple to be challenging. I planed to release a final version by the end of this year. So a lot of things need to be done during the next month. For the final release, I also though about improving the AI. I don't know if I can make it within a month, but I will try.

I'm attaching some screenshots of the main game menu and the game play.

I'm inviting you to check it out by searching "tower commander" inside the Android Market. :)