Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
Friday
Mar182011

Red Nose Day Script

image

Here is the script from the lecture today, lovingly rendered with slides and words. Well worth the money you are going to donate once you have downloaded it:

http://www.robmiles.com/storage/Rob%20Miles%20Red%20Nose%20Day%20Lecture%20in%20Rhyme.pdf

Thursday
Mar172011

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…

Wednesday
Mar162011

Steak Pie Powered Poetry

Woodwork

With the lecture only a couple of days away now I’ve settled down to write some words today.  Great fun, although it does make my brain come out of my ears. We went down to the Ferguson Fawcett pub in Walkington for some “Steak Pie Therapy”. Which went down a treat.

Tuesday
Mar152011

Kinect and Home Sweet Home

Kinect and Home Sweet Home

Tom and Laurie from Home Sweet Home came into the department so that we could work on our setup for Platform Expo, which is coming up real fast. We had Paul Murphy from BBC Look North along to take some film as well, which was nice. We showed what we had done and most of it worked. To see all of it working you could come along to the Platform Expo a week on Sunday (the 27th) and even drive the music and video yourself.

http://platformexpos.com/

Monday
Mar142011

Red Nose Day Streaming Fun

Red Nose Day Streaming

I’ve made a special poster to celebrate…

I’ve sorted out the streaming of the Red Nose Day lecture in rhyme. You should be able to join in the fun and games here:

http://www.ustream.tv/channel/rob-miles-red-nose-day/

The channel will go live on Friday 18th of March at 12:15 GMT.

Be there, join in the fun and win prizes.

And don’t forget to sponsor me:

http://my.rednoseday.com/robmiles

One lucky sponsor will win a Windows Phone device.