Getting a Windows Phone App to Market

Red Nose Game Screenshot
Now you really have to get a copy….

My Red Nose Day application has finally made it to the Windows Phone Marketplace. In spite of my efforts. It is the first fully developed game that I’ve put out there, and getting it out there was quite an experience, especially when it kept failing certification. So that other people can learn from this, and so that I don’t do the same stupid things again, here are some hints for preparing a game for certification.

Consider the Pause and Tombstoning behaviour at the start

I got so carried away with my game ideas that I ended up leaving all the code that dealt with pause and resume, and what happens when the game is tombstoned, until the very end. The plan was to add this in a couple of hours. This did not happen. I spent a lot of time messing around and finally ended up with something that was not correct according to the Marketplace requirements. Foolish me. I had used what I thought was a rather nice fading effect between screens, but this caused me endless grief when I realised that I might get tombstoned during a fade. And the game structure had a huge bearing on what I had to do when the user drops out of a game, something that they can do at any moment on the phone.  Next time I’ll design the gameplay with a view to the fact that my game might get stopped at any instant. 

This should extend to making game objects “tombstone aware”. In other words, don’t try and impose the phone behaviours on objects in your game, make sure that the objects themselves can deal with suddenly having to stop and resume.  This is something that game developers that have not written a lot of mobile games might find new and a bit scary, but it turns out that if the objects are built with this in from the start it makes the game a lot more reliable. My code tried to knock the game engine into a particular state for tombstoning, what I should have done is have states and messages specifically concerned with suspend and resume.

For those that don’t know what “tombstoning” is, it is the recognition of the unpleasant fact that a program on a mobile device is always vulnerable to an interruption that results in the program being stopped or, worst case, removed entirely from memory. Windows Phone programs deal with tombstoning by responding to the various messages that are sent in these situations and the Windows Phone Marketplace has strict standards on proper behaviour.

These are messages are not hard to deal with, but you have to get your head properly around the way they work. You must also not assume (like I did) that Silverlight and XNA tombstone messages are exactly the same.

Make sure the Back button always does something

I made the an assumption that in some screens there was “no need” for a back button, since the player wouldn’t want to go back to the previous screen in that situation. Stupid, stupid, stupid. I tell my students that every time you make an assumption, somewhere a specification fairy dies. I should have read the Application Certification Requirements that state emphatically that the Back button must always do something, either return to a previous screen, exit the app if at the “front page” or pause gameplay.

Make sure that the first page a user arrives at is a sensible one

I was very proud of the way that after a restart my game always went back to the same page it was stopped from. Unfortunately this is wrong. If the user starts a new copy of the game (as opposed to resumes it) then it must go to a starting screen where the Back button can be used to exit the game.  Again, I’d not read the requirements in enough detail to appreciate this.

Make good use of the Testing Reports

The test reports are great. They are actually written by someone who has played your game and will give you a simple sequence of steps that illustrate the broken parts. So work through them carefully. I found that I could  follow their steps and then, having seen the fault, it was quite easy for me to drop into the code and put it right. One tiny thing, when you re-submit an application you lose the reports from the previous run, so if you want to know what you had to fix you should save the pdf files when you have read them.

Keep Moving Towards the Happy Ending

The Marketplace people are great. Don’t think of certification as a bunch of obstacles that you must pass through on the way to getting to market. Instead you should regard the certification team as a bunch of folks who are tying to make you produce a solution that works the same way as all the others on the Windows Phone, and doesn’t do anything stupid.

Anyhoo, search Windows Phone Marketplace for Red Nose Game and let me know what you think…