Pixel Hero - Windows 8 App Post Mortem
This blog post just didn't want to get out the door so it's being published almost half a year late:)
I published a Windows 8 app, Pixel Hero late Saturday night (9/7/2013) into what is now called the Windows Marketplace. Apps published into this marketplace are still commonly referred to as "Metro" apps. Overall, the development process was easy for me as I have done lots of C# and desktop application development in the past. I went with C# and XAML because I don't think the WinJS model could possibly be mature at this point.
My app, Pixel Hero, has lots of image manipulation which was greatly simplified by using the Writeable Bitmap Extensions nuget package. The Writeable Bitmap Extensions library made manipulating the many png images very simple... resizing, scaling, drawing ellipses are all available in this library and used throughout the application.
Windows Store apps must use the winrt runtime which comes with new APIs for common functions. Many operations now have an async interface. Using async properly proved to be the item that required the most learning on my part. Saving files to disk and manipulating the images are exposed via async API calls. You can get quite far with async by understanding several basic patterns. Here is a blog post I wrote that summarizes the basic concepts you need to understand to be successful with async in .NET.
Using a custom font in a Windows 8 app is a breeze. I followed the advice from this blog post on setting up a custom font.
Here is a snippet from
MainPage.xaml where I setup a custom font in my application.
<!-- http://www.reflectionit.nl/Blog/2012/windows-8-xaml-tips-custom-fonts --> <!--http://www.dafont.com/search.php?q=8+bit--> <Page.Resources> <FontFamily x:Key="8BitFont">/Fonts/8bitoperator.ttf#8bitoperator</FontFamily> </Page.Resources>
Windows Store Images
Like all modern app store development you need tons and tons of images for badges, logos, splash screens, tiles, icons, etc... I handle this by first making a large image at 1024x1024 and then using Image Magick to make all the needed images. Here is a powershell script I used to automate creating all of the images.
I ended up serializing my applications data to a file using the
DataContractSerializer. I found serializing and deserializing to and from xml made it easy to develop and debug the application. I ran into an issue with json .NET that I cannot recall at the moment.
Developing the Windows 8 application was a rewarding experience. Download Pixel Hero today!