Wednesday 30 January 2013

Postmortum


While I have blogged about my latest game Onion Vs Wheeles  a number of times I figured it was time to do a bit of a postmortem on it.

Onions Vs Wheelies is a very simple 'Dalek' clone straight out of the eighties.The goal was not to produce an outstanding game but to iterate on my slowly growing gaming library, get a better grip on whether I like the
entity/component style of programming and go through the process of actually releasing a little game on to the web as it had been a while.

I decided to have a go at porting the game to android.

What when right:

As it was a clone there was no need for a design so to speak. Initially I just opened up Inkscape and drew some art, The I started coding. It is a small game and I wanted to see if the entity/component architecture would hold up to me just coding on the fly.

The whole game was coded in CoffeeScript and my editor was GVim that had been tweaked a bit to compile CoffeeScript on saving and report any errors.

CoffeeScript is pretty concise meaning when I created a component they looked pretty good without any. Components lend themselves to only doing one thing almost by design. This keeps them simple although it may shift complexity upwards in the way they interact with each other. I didn't experience this but could imagine it on a larger code base.

I am still in the process of learning vim (does it ever stop) but have attained enough skill in it that it now keeps out of my way. The CoffeeScript compiled quickly resulting in very fast iterations. Perhaps not as fast as using LibGdx and Hot swapping but Coffeescript is less verbose compared with Java. Trade off
are always fun and one of the reason I flip between technologies.

My engine grew a little bit in terms of functionality and hit "no oh dear I am going to have to rewrite the engine" moments.

What went wrong:

Given it was a fairly small game done over a short period of time that is not much that can go wrong in a big extent.

The biggest issue I had was porting to android. I took the route of wrapping the generated JavaScript and html code in a WebView and then producing an android APK that could be put on the play market. This was is my first experience in doing this sort of thing for games.

I hit a number of problems that were trivial to fix but revealed my lack of experience with my tools. I had no idea how to remotely debug websites being displayed on chrome. Discovering the desktop Chrome can simulate touch event was new to me as well. Next time round I will be a lot better prepared.

While the game appeared snappy on my Nexus 7 it crawled on my HTC One V. The One V is a lower spec-ed phone running android 4.0. Given the simplicity of the game it is looking like just simply wrapping up the game is really really a good approach if I actually want people to play it.

I am pretty sure the WebView in 4.2 is powered by chrome whereas in 4.0 it is the older WebView. This may be the reason for the slowness of the game as the hardware in the HTC One V is not that bad.

It would certainly be a shame to limit my ports to 4.2 or above, well at least for the next year or so.

A lack of promotion.
I decided early to not promote this game but it did occur to me that I should be learning about the preferred size of displays and at least generating a list of HTML5 portals to submit to. While just coding games and putting them on my website is fun learning the whole process is what I really want to do. Making
an effort early on and learning from my attempts is very important. Deciding to not promote other than blogging is not really a good start to this. Not promoting is a mistake.

Art Skills
Not being able to draw is a limiting factor and something I should work on


Conclusions
Overall I am happy with my results looking at it from a technology stand point. Obviously the game is quite limited. As my goal is to iterate through a few games to learn more it is a good start particularly given it has been quite a while.

Having written this postmortem has given me clarity on what I need to do next in terms of improving things. Given most improvements are outside my comfort zone if should mean I am in for a period of growth.


No comments:

Post a Comment