Android: Noiz2 – 1.2.4

Hi to everyone surfing in on their Android phones.

The good news is I have finally released Noiz2 to the Android Market.

Porting this application to Android has been a lot of work so I hope people like it. There is a complete explanation of the game here.

Leave me some feedback. Please be specific about ‘improvements’ to the graphics because I am not sure what that means. It’s a vector styled game!


Some items on the TODO list:

Android: Noiz2

Following on from my porting of Kenta Chos BulletML demo I decided to port Noiz2 to Android.

I’m not going to go into a great deal of detail as to what was required to get this to work on Android. In short, I had to rewrite the entire BulletML parser which was quite a bit of work. This was because the code used a pull parser which wasn’t available for Android. I converted it to use XmlPullParser. Then I had to seperate the update code from the draw code, implement a screen canvas drawing layer and pull the whole lot into use the Android class “CanvasSurfaceView”.

It just so happens that all the graft I put in with my previous Android applications _combined_ with the stuff I had picked up when trying to write my own shoot-em-up came together so that I thought what-the-hell and launched into trying to port it to the Android phone. So what do you think..


This was a great learning experience as my own game is far from finished and I had not at that point come against the pitfalls of trying to write something which uses the touch-screen to control the game.

It’s not quite ready for publishing yet but I did have to go back to the developers forum to check on why the touch screen slows down the rendering of the game.

If I have got this correctly: there are two threads to the game application. The UI thread (which handles the touch screen) and the game itself. Any game on Android is split into two theads of execution – the the update of the screen elements and the update of the UI. Using the touch screen to update the position of the ship slowed the game to a crawl. What to do?

The solution as stated here is to put a “Thread.wait” into the touch handler.

The reason this works is that the Thread scheduler divides time between the competing threads. If you touch the screen then the UI automatically gets a large chunk of that time. This slows down the game drawing thead. The solution is to sleep for a short amount of time to free up the game thread to draw the screen elements.

Well it seems to work up to a point. The later levels with lots of screen elements still go at a crawl but I see this is still the case on the rRootage port to the iPhone (which I now see has been published).

Here is a picture which does not do justice to my own shoot-em-up.


This is written using the OpenGL surface. All the screen elements are animated so the ships engines are working away and the missiles are spinning and changing colour as they move up the screen.

I have tried to write something which is an elegant as I can. No ugly shortcuts. The reasoning behind this is that I can optimise it later but for now the code should adopt nice Java6 structures and any design patterns that seem applicable. I keep getting sidelined into other stuff but as of now here’s the plan:

So that’s the plan. I rarely abandon ideas so I suspect I will see this through. Should be interesting to see what I come up with. I have some nice ideas which I think will mark my shooter out from the pack so lets see….


The source code for this is now available here.

Android: BulletML

In the process of putting together a shoot-em-up style game for the Android phone I remembered coming across BulletML from Kenta Cho. I am familiar with Kenta from rRootage which was/is the coolest shooter for the jail-broken iPhone. Somehow it has never appeared on the app store which is pretty bizarre. Anyway I knew that Kenta had defined a mark-up language for defining all the crazy bullet patterns from his games. I had a look at the Java Applet here. It was written in java how hard could it be?

In the end it wasn’t too bad but I still haven’t a clue about Kentas code which is as opaque as it gets.

I can visualise how I will marry this to my game although I will have to write an OpenGL rendering layer.




Demo source code here. I haven’t decided whether to put it up on the market yet in the demos section.

Update #1
I have rewritten graphics layer and implemented an OpenGL renderer for drawing the lines. Anyone interested in line graphics on Android might be interested in this. The line width feature under OpenGL does not work on the phone. It appears the width is fixed on the actual hardware to 1px.

Update #2

I got the profiler working. It looks like the application was linking to the opengl class in the SDK on the phone. Well, that’s what it looked like because when I changes the package name for the opengl stuff I ‘lifted’ from the v1.5 source it started working. Go figure.

The subversion source is kindof broken in the sense that I havce come across a bug in the int buffer. To make it work on the emulator comment out the lines marked ‘workaround’. More on this in later posts.

Android: Getting the cupcake source

I am currently working on a few projects with Android. One of these is an OpenGL game. Looking at the most recent blog post on the Android blog there is mention of a GLSurfaceView class which I was immediately interested in. The problem is it is in the 1.5 Cupcake source branch. How to get the code?

I had previously installed Git but it’s been a while since I used it so I couldn’t remember the commands to pull a branch of the code down. Stumbling around the inter-tubes I came across this page which has a url which pulls the latest head of the current branch. Hmmm I thought, I wonder if it would be possible to modify this to get the ‘cupcake’ branch. Well the answer is yes. You just have to modify the ‘h’ parameter to point to the target head.

So if the head is referenced as h=refs/heads/cupcake then the full url is;a=snapshot;h=refs/heads/cupcake;sf=tgz.

My plan is to pull the GLSurfaceView code out and build it into my app. This a stopgap until the 1.5 SDK is published officially.

Android: gTraffic UK and BBC Data

I think it might be worth pointing out that the gTraffic Android application does not break the Terms and Conditions applied to the BBC Traffic data. The biggest singular reason for this being that it is free. It will always be free because (unless I strike a deal with the BBC, TrafficLink and the Highways Agency) that is the main condition of use. See for yourselves here. I did see an argument on the comments for the iPhone traffic app which tried to reason that anything using the data was basically an RSS reader but I understand perfectly well that this is not the case. It is the data which comes under the Terms and Conditions and no amount of pre-processing it changes that.

Android: gTraffic NY

Here is gTraffic application modified to take NYSDOT traffic RSS feed.


This is a bit of an experiment but I am hoping someone might find it useful. I have split the NYSDOT feed into regions. The application filters the main RSS feed according to a centre point and a radius which I took from Wikipedia. The application is up on the market so if your from New York then download it and send me some feedback, I can take it.

Definitely my last Android traffic application for a while as I _really_ have to get on with another more pressing application.

On a different note I see that Doom has been launched on the Market. The key bindings are a bit hard to setup but it’s still pretty cool.

I have removed the NY traffic application from the market. It was an interesting experiment and I managed to get some nice refinements for the UK traffic application from it but I have to view it as more hassle than it was worth. NYSDOT do update the feed but only to add severe incidents like accidents and the like, otherwise it just looks like the data is old. This seemed to confuse the users of the application.

Android: gTraffic – Crashes

I have been getting reports of crashes with the latest version of gTraffic for Android. This is all a bit unfortunate and a bit of a surprise. It works fine on my dev phone but that has been updated to the 1.1 version of the SDK. I see there could be many reasons for this. I  am loathe to roll back to the previous version as it has many annoying flaws which I fixed in the most recent. I will watch and see if the installs start to rise again and try and get some feedback as to whether it works for some people. If it works for you please email me or leave a comment.

Update #1

Well install didn’t start to rise again they just fell and fell. I am totally gutted about this as I didn’t mean to cheese people off. I guess the damage is done. I have withdrawn the app from the market until I can figure out what the hell is going on.

Update #2

I have rebuilt and re-deployed. Strangely the file size was different between the old and re-compiled version.  I am clueless as to why. Let’s hope this has fixed it.

Android: gTraffic 1.3.5

version 1.3.5 is up on Android Market. This has a few improvements for stuff that was annoying me but not necessarily things people might have noticed.

Lots of nice comments. Thanks for that. In answer to those people asking about a U.S version I will have to look into it. The UK has quite a progressive agency for traffic management who are heavily into new technology and public dissemination of such travel data. The U.S is a lot larger and data tends to be supplied on a city to city basis. Also (and most significantly) it’s not generally free to use. I would have to strike a deal with what amounts to the local authority for the target region.

Android: gTraffic Published!

I finally got sick of working on gTraffic for Android and published it. There is still a ton of stuff I would put in but I have to get started on a commercial application.

Go to the Android market to download it. You can view comments here.

A bit hello to anyone surfing in here on their phone. Feedback always welcome.

Android: Traffic App – gTraffic

Side by side. You can see the Android app looks like it has pulled the more recent data.


I am still struggling with making an XML pull parser which extracts the data to the same degree of accuracy that the old Python parser did.

← Previous PageNext Page →