Game Play Videos

Up until now, I have been blogging more about the tasks I have been working on.  I realize I haven’t really explained what my game is about.  It’s a 2D style fighting game where you control a martial arts master who uses the power of tea to fight.  You fight while holding a tea cup and taking sips of tea buffs various stats depending on the tea spices you use to brew your tea.  Additionally, drinking tea builds up your Tea Meter which allows you to execute various Power Moves during battle.  These are strong attacks that cannot be blocked by enemies.  The amount of tea your cup can hold is finite so you can only take so many sips of tea each round.  Each time you get hit, a certain amount of tea also spills out of your cup.  Here is some gameplay footage of the current beta.

This was a fun attack that I added early in the game.  If you’re getting desperate and still have some tea left in your cup, you can throw your tea in your opponents face and bash him with your cup!  Fun times!


Character Updates

I finally finished the new head for the player.  This is something I started a while back and worked on it on and off.  It was a real learning experience since I’ve never really modelled a fully animated head before. I’m pretty happy with the results though.  What I did differently this time around was to draw the topology lines on the front and side images of my concepts.  This really helped with modelling.  With the other heads, I wasted hours tweaking my edge loops to try and get a good topology.  I spent a long time painting the texture with cartoony details.  They looked good in Blender but I found that it didn’t fit too well in the game.  I noticed the same issue when I painted some details for the armor pieces.  I put lots of shading and surface details but it just looked out of place.  I ended up having to adjust the contrast and brightness settings heavily to mute the details.  So I started a new texture for the head and kept it very simple.  This looked much better in the game, especially on a mobile device.  The simple texture also allowed me to compress it down in size a lot with no visible compression artefacts!

I wasn’t too happy with the hair from my previous models.  I decided to model more details in the hair this time and use a very simple texture.  Most of the details would come from the light source and shader.  I was really happy with the way this turned out.  I may go back and redo some of the enemy hair meshes later on.

Here is how the head looks in Blender.  I used more bones this time around for better facial animations.

This is what the player looks like in the game, a huge improvement!

I also dedicated some time to finalize the look for the enemies in the game.  There are 6 so far, I hope to have at least 7 or 8.  If the game does well, I plan to add future updates that opens up new areas with new enemies with other abilities (elemental?).

This last week I spent most of my time preparing the game for another beta release.  This required lots of coding with spare time being used to tweak and polish animations.  Now that the beta is out the door, I’d like to prepare some things so I can start posting my game on development forums for feedback.  This is something completely new to me, I follow quite a few development forums but never participated myself.  But it’s something I should try to do regularly.

Environment Upgrade

The last few weeks I’ve been trying to follow my latest project schedule for a beta release in mid-April (hopefully).  Up until now, I’ve been loosely following schedules that I revise every few weeks.  I always stray off to focus on additional tasks that reveal themselves as I’m working on my current tasks.  This totally wreaks havoc on my schedule but it’s also quite fun to work this way.  Now that the game is near complete, I hope I can finally set a schedule and stick to it.

Last week, I focussed completely on environmental artwork.  The last time I did any work on the environment must have been over a year ago so this was long overdue.  I only allowed myself one week to work on this and I completed pretty much what I wanted to get done.  But I do want to put in another week of changes sometime after beta release.  I’ve been playing a lot of Rayman Legends with my boys and I really like the artwork.  You just don’t see many games like this anymore.  Half of the times we were playing, I was actually just focussing on the artwork and observing how they created such amazing environments.  I used that as inspiration as I created new textures and meshes for my background.  I actually played Rayman Legends and moved my character to some locations that I really enjoyed and left it running for hours as I painted textures for my game.  Here are some of the textures I was able to create.

Here are images of the new environments in action.

The bamboo clusters turned out far better than I expected! They animate too!

The rock textures are used for floating islands in the background. They’re organized in different parallax layers. You’ll noticed the effect when you ascend up to the next platform.

I’m very happy with the results, not bad for programmer art.  After looking at these screens, I find the lighting in the scene is too flat though.  I will try to add some subtle shading to add more depth.

For comparison, here are how the same levels looked like with the old environments

The new environment artwork also makes the mountain texture used in the background stick out.  It just looks horrible plain and simple.  I think this texture was done a year ago and I actually spent a whole day on it before giving up and settling for this monstrosity.  It’s good to see how much my digital artwork has improved.  I will definitely replace this eye-sore before release.

Performance Issues

After adding the new environment artwork, I loaded up Unity on my Mac and made all my usual tweaks to the texture import settings to compress them with minimal visual artefacts.  I deployed my game on my iPad 2 and noticed a significant drop in performance for levels that used the bamboo clusters.  For the first time ever, I was hitting below 30 fps and animations definitely looked jerky.  I changed the project settings in the XCode project to view some profiling information and found the draw calls had grown substantially.  Each frame was now making around 350 draw calls.  Clearly this wasn’t optimal and I went back to see what I could do with the bamboo clusters.  They were originally modelled in Blender as separate objects with their own animations.  I typically use a vertex shader for swaying objects but I decided to animate the bamboo directly so I could create more interesting animations.  I tried a combination of different things but in the end, I combined the entire bamboo cluster (of about 10 bamboo) into a single mesh and used an armature to do the animations.  This cluster is then instanced a few times and scattered in the background.  The texture for the bamboo is very minimal, just a single bamboo texture that can be tiled vertically.  The leaves are also part of the texture but occupy another side so that it does not affect tiling.  I achieve different looking bamboo by using vertex colors.  With my new changes, draw calls were back down to about 150 and I’m getting around 45-50 fps.

Beware of Point Lights?

While investigating the performance issues related to the bamboo clusters, I noticed the rendered triangle count reported by Unity was abnormally high.  I was close to 30K triangles per frame!  The only objects in the scene with fairly dense meshes would be the characters but there’s no way it should have been so high.  I tried disabling one of the body parts during gameplay and noticed that the rendered triangle count would decrease by double the triangle count of the mesh itself.  So it turned out the characters were rendering in 2 passes.  I looked at the shaders I have written and found they were all Unity surface shaders.  I rewrote one of the shaders as vertex and fragment programs using CG and tested it out.  It was still rendering in 2 passes.  So I checked the one an only light source in the game.  It was set to a point light so I tried changing it to a directional light.  That was it, changing to a directional light made every body part render in a single pass and my render triangle count was back down to under 20K.  I didn’t really notice any hard evidence of performance increase though.  So I wonder if the reported triangle count might be buggy in Unity (version 3.5.7f6).  But just to play it safe, I’ll keep it as a directional light.  When I have time, I may try and track down the cause of this issue.


I’ll be focussing on the player mesh this week.  You can already see some of the changes I’ve made in the latest screenshots.  The head I have been using is very old and it’s about time I replaced it.  I’m only giving myself one week to work on this, hopefully I can get enough done in that time to move on to my next tasks.  But it has been while since I have done character modelling and animation.  I always stumble badly when it comes to rigging and this is the first project I’ve done using facial animations.  The player character will use a more elaborate rig than the enemy heads.  I’ve been reading through a lot of online tutorials for modelling and rigging and I’m trying to create a cleaner topology that is more suitable for animating.  Ok, back to work!