Ad Free Game
I've fixed up the game, and it's probably pretty close to Beta. However it's just not doing the #'s I've wanted, so I'm putting it on the backburner.
I've removed ad's and I'm going to let it grow. I'll do a maintenence release in about two weeks for some bugs, but until it gets some level of market popularity it's on hold. I will probably make a major upgrade in the future, redo all graphics and promotional material and re-release as a beta, however I think this is it for the Alpha release. It's a lot of work supporting the community, and I think I got all the feedback I needed for now.
It will continue to be playable, however one day when the beta releases I'll force everyone to update to the new package. 4.1 rating is good, but I want a 4.8 or I won't be happy with myself.
Anyways, I hope you keep enjoying the game, it'll likely continue to be free in the future.
Code Quality
I've got a game now, and honestly I'm reasonably proud of it, however some common problems remain before it is perfect. Some of these things were solved in past games I had, they are obvious problems that are easy to over-look.
1. Is code bloat. The more you add the more complex it gets. I've spent time refactoring and cleaning the code structure. The clearer the structure the easier it is the maintain. 110 java files across 55 java packages now, in the main project. In the libraries, you can add another 10 or so packages, and 50 or so files. I'm not sure what my TLOC is, but I think it qualifies as a big project.
Maintaining order is of very high importance. I've actually deleted about 5-10% of it, and I have plans to delete and consolidate much more.
2. Garbage Collection is a bitch. The UI and the controls/widgets just tend to do things performance wise. It doesn't really affect gameplay noticeably, but it's probably a pretty big drop in FPS. The #1 offender is strings, especially numbers. I delt with this in old games with my GL based fonts, but not with canvas drawing. As such I am just in the process of writing GC Free routines to help speed up these cases.
Bullets are the #2 offender in GC. I spawn/destroy a lot of them when the AI goes. I should recycle them. Recycling bullets will also allow for much more advanced game weapons and effects.
Ideally I want the GC at 0, because it is a pretty definitely bottleneck, so I'll continue to work towards that, and a few other UI/graphics improvements.
Anyways, that's the quick update for now.
Update Schedule
I'm updating my "update schedule"
I said sundays, but my first update went out on friday with a shit-ton of customer requested features.
Version 1.0.2 is due soon too, I'm just doing QA and removing the last few issues.
Improvements Include
- 25-30% improvement in FPS
- More UI tweaks and improvements
- AI no longer looks like it's having a seizure. Featuring smooth tweening between shot choices.
I might release the update today or tomorrow, but let's just put it at "weekly/mid-week schedule for updates".
This update marks a majority of the release polish, over the next 2 weeks I'll try and add a solid set of weapons, and bump the "alpha" to a "beta".
We’ve gone gold
The Metal Rain game is now live on the Android Market (Download Here).
I hope you all enjoy playing it as much as I enjoyed making it.
Todays Goals
Every day it's important to classify your development goals. It's not good to get stuck on things that don't matter.
Yesterday I added to the "dead state" of the players, instead of colored markers they now show fire and smoke rising from their mechanical corpses. It's amazing the effect only a few point sprites can have.
I also refactored the bullet logic and completed the first bullet type with 5 sub types (sizes). The animation slightly varies between them.
The default subtype is obviously just a small explosion with varying levels of damage.
Release is coming soon. Stability is good in the game, and I probably don't need to optimize before release as it works well on target hardware.
I think with a few days of optimization I can make it run well all the way down to a nexus one.
Todays Work So Far
Bugs:
- Damage doesn't register 100% of the time, leaving AI battles going to infinity
- In-app-purchase cancel button freaky (can probably streamline purchase process since it's not in a wallpaper)
New Features to come
- 2 New weapon base-types
- Game balancing
- Tutorial Overlay
I wasn't really happy with the explosions that I used in earlier in development. A sphere mesh with shaders is fun to fuck with, but doesn't make cool looking trails and fire. For that I need a particle system.
In past 2D titles, I'd use film strip style pngs to do my explosions. Draw them with texture quads. Since I was using GL 1.1 I'd drop id drop into TEXTURE matrix mode, scale and position my place in the film strip and it's done.
In Es2.0 things are different, no texture mode, and in SpriteMaps, you need to calculate the filmstrip UV position in the Fragment Shader. So I pass in Frames, age, etc, and it calculates the appropriate offset.
I used the exact same asset as the older games to begin with, and once it was working it looked good. The fire trails look realistic and look amazing in motion. However they were a bet repetitive. Using the same animation is monotone and obvious after a few seconds. The human brain loves randomness and when there is obvious patterns it tends to get bored quickly. The solution was to add more explosion animations.
To achieve this, I quadrupled the height of the film-strip and added all 4 explosions I generated in the past. Upon constructing each point it chooses a random row from the explosions, and it really adds a distinct random explosion effect.
It looks pretty good, although point sprites become obvious when rotating quickly around the target, so that is something I have to take into account when doing explosions and stuff.
Also the Z-Buffer write is ignored during my point sprite call, so I draw things in the best-guess for painters algorithm. It wouldn't work for crazy camera angles, but you shouldn't see those cases in the game.
I should write more often
I've been very busy lately with my day job, so I haven't had time to update the blog. (On that note if you are a BC Lions fan, the new app is up on the market).
The game is coming along nicely. I've had a couple to-do lists and I've burnt through them, I'd says it's like 85% complete.
Features are 99% complete, however there is a fair bit of "content" I would like to add before launch. In a way I saved the best part for last, my dessert so to speak.
There is also very few bugs on my tested hardware, which is always good, nothing that should hold up a release.
Explosions, Particles, Lighting
Some things you'll notice about the new screenshots. There is Ad's!! They've actually been in for a while, but nobody sees them because I typically take screenshots in the interactive sections of the game, while the ad's only show in the non-interactive sections (such as when a bullet is being fired).
The environment now has lighting, there is a global light direction, and a secondary "target based" point lighting. As a bullet travels or the selected player will be lit more then the rest of the environment, for a nice pixel shaded effect. It all runs pretty fast too.
The explosions were tweaked and changed, you can see a still of one above, they look nice in motion. To construct them I take a high resolution mesh, and then use a vertex shader to animate it nicely using some trig. I do the UV mapping based on local coords and not UV, so that it gives a perception of a 3D texture.
One clever hack I did in this process is the packing of 4 noise textures into one png. Noise images can be used to compose all kinds of effects (such as clouds) in the pixel shader, and by packing 4 mono noise images as RGBA, I can quickly do lookups and calculate realtime dynamic textures based on the noise lookups. I do realtime texture generation in a couple places, mainly in the fire-particle shaders I've written.
The particle system just went in today, giving a much needed addition of environment to the shots. Bullets are now followed by awesome trails of blazing fire, and soon explosions will have additional particle units coming out from them, because explosions will make the game.
A New Screenshot
We got the improved markers in, and a improved model, did another small revision, there was a annoying trait and I removed it. (Just one polygon went to far back and didn't work with the camera angle, so I changed the area up a bit and now it works better with the camera).
As you can see, the Enemies that are out of range are now easily ranged using there colored marker combined with the sprite marker.
I also added a optimization to not draw the players and only the marker if they are at a distance where they are mostly a waste to draw. Users shouldn't notice this, they are about 3px in diameter when they show up initially, but it'll really help performance on most phones.
Speaking of performance, it feels like I'm pushing a solid 60 lately. It's pretty amazing what phones can do nowadays. Ironically part of that performance boost is due to ad's. I dedicate a small portion of the screen to Controls and Ad's when the controls are out of use. This really gives me like a 10-20% boost in FPS. It can make quite a difference if I want to use pretty shaders and stuff.
Speaking of Shaders, I need to write a "smoke trail" shader and a improve the ground shader. I want to add both directional light and point light to the ground shader, as well as distance fog.
There is also AI to do shortly, I've never done AI before, but how hard can it be. Once I do AI, I'll probably release a alpha version with the store disabled. I'll probably need to spend a couple weeks making the store and it's items awesome.
Beefier Turrets
Things I have done, and plan to do soon
- redid the turret textures, they looked wimpy and that just wouldn't do.
- increased the FOV significantly, and put the camera in a slightly more epic position. It provides a bit better of a experience, low FOV's make it harder to find enemies and that should not be the difficult part of the game. People subject to motion sickness perfer higher FOV's as well, and I should be sympathetic to these people who may play the game on a bus or helicopter.
- Point sprite targetting, works on xoom but nut nexus S yet, I think it's texturing or simple opengl issue, I'll crack it soon. The feature is a absolute must, it really helps find your target and makes the game look much better. I also need point sprites for things like missile trails and fancier explosions, people will like the game a lot more if there is some simple particle systems.
- Levels via virtual world works great, it means when I launch Ill have 6 levels included (3 megs data) as well as about 20 other maps people can add on, sufficient for hours of fun. I'm not sure of the purchase model yet, but I'll figure something out.
TODO:
- Skies, part of the VirtualWorld addons, should be easy to implement and should cut a fair bit of my download package size that is wasted on a test skymap.
- Resume Game button, test and fix, support saving in onDestroy and resuming in onCreate so that users can reset there phones and still resume there games in any phase.
- Particle systems, this is my highest priority, I think I can make cool looking smoke trails and stuff,
- More weapons, strategic weapons
- Tutorial, it needs to be done, without it people get confused and give up, you have like 15 seconds to explain your game well enough that people understand it. I think I can double this as the promotion screenshots. I think if I can convey gameplay and how to play into the market promotional tools it'll get more commitment from the people who download it.
Thats it for now, I'll try and make some implementation posts about how it all comes together and post more screenshots as it does. I don't have much time for this now because Hockey season is rapidly beginning and I have other projects in the priority queue. The game is coming to the public though, it's to close not to, right now it's just a playground for me to build a nice sand castle in, and I'll release it when I feel my sand castle is epic enough.



