Sunday 6 January 2013

Odds and Ends (Current Game and JQueryMobile)



Over the past couple of days I have been busy. I have downloaded the android sdk again and am starting to get my android dev system set up. This is motivated by the fact I have been getting some reports that some of my apps are not posting to facebook anymore. I have had a little bit of a rant about facebook in the past so shall not cast stones until I have investigated the problems other than to say it would be really nice if facebook started to support intents. Perhaps they do as I have not checked in a while.

I was looking at JQueryMobile for a while again. All the transitions now work quite smoothing on my nexus 7 in chrome, that is pretty nice. I once entertained the idea of writing a few apps with JQueryMobile and then embedding them in an java wrapper so I could release them on the android market. I am left wondering with the WebView component provided by the java api build on top of the chrome renderer or is it still based on a pre-chrome port?

These things only took a small part of my time. Most of it has been spent working on a little game I am making, It is a clone of the old 8-bit game called Daleks. So far it consits of about 800 lines of code about 400 of which form my slowly evolving gaming library. Most of the game mechanics are in place other than the player dying, I usually add this last in simple games as it make development easier. There is a bit of refactoring needed to support in play states but otherwise I am happy with the progress of the game.

While the graphics need has consisted on only a few icons I have taken the approach of drawing on pencil and paper and then taking a picture of them. This is then imported into inkscape so I can manually trace and then color the image. It seems to be working fairly well. My paper drawing skills exceed my inkscape skills but both are very poor.

I continue to learn some of the corner cases of CoffeeScript, like how to get the index of the item in an array with using CoffeeScripts' for loop. The approach I am taking is one where I tolerate messy code in the game code but not in the library code. In a months time I probably won't touch the game code again while the library code will be being used in a different game. The game code is limited in scope and size and I doubt the whole game will get much above 1000 lines so I don't expect the complexity to kill me.

The entity/component system is really easy to work with and certainly separates concerns very well. I am not really using the power it gives in composing together different components on such a simple game. The C++ programmer in me really struggle to not "fix" my very inefficient implements of the entity system but for now I resist. For a laugh I may take a few days after releasing it and see if I can get it working on an android device but that is a little way off.

No comments:

Post a Comment