Tuesday, 17 January 2012

Make some cash developing for Windows Phone

imageIn this post I’ll try to share my thoughts and experience developing applications for the Windows Phone Marketplace. I’ll share with you why I think it’s a great platform for an indie or pro developer, and I’ll also try tell you what did work in this last years, what didn’t, and a couple of hints that could help you improve a bit your revenue.
First things first: I’m not a professional developer for mobile devices. I am indeed a software developer in other fields, but as I always was interested in this kind of devices, I decided to give them a try. All my interest was to test the investment and resources needed for a development like that, and the return profit one can expect from it.
Although not everything I tried really worked, my applications has been downloaded almost 22.000 times since published (today is January 17th, 2012), with a full version conversion rate of almost a 16%. This is my total and daily download chart since October 2010:

A bit of history

Windows BlocksMy first application for the phone, published in October 23rd 2010, was Windows Blocks. It was a very simple Arkanoid-like game, that was first developed as a C# game developing tutorial for a webcast. The title of the webcast was: “Developing a full Windows Phone game in less than 2 hours”. Once it was done for the webcast, I decided to finish the few details still remaining, and to publish it in the marketplace, just to learn how it worked. Of course, it was not a hit, and the reviews weren’t excellent (remember it was done in a few hours), but it was a good first try.
In those days (a couple of weeks after the Marketplace was launched), the publication process was a bit of a pain, I must say. But it has been improved a lot since then, and now it is far easier.
Then, I decided to make something more serious, investing more resources and effort, what lead to my second Windows Phone game: Gravitards. It was a beautiful skill game in which the player had to move a ball through several levels with progressive difficulty. This time, reviews were much better, and sales were better too, but honestly not enough to cover the hours invested in the game.
In the first case, it was not surprising that things didn’t work. After all, I didn’t invested too much efforts in the game, so that was predictable. The second one though was much more detailed and I put much more care into it, so I expected more. However it was, it had a couple of drawbacks users complained about that kept sales down I guess.
Silver NavigatorBut then came my third attempt: Silver Navigator. It was not a game, but a GPS-like application.
One day, I had to drive to Madrid. My ex-wife kept my old GPS, and it was a holiday here, so I couldn’t buy a newer one. I decided to check in the Marketplace if there was something like that in there, but there wasn’t yet. Then, I remembered that I saw once a Silverlight Bing Maps control over there, that had pretty decent features. So I took Visual Studio, created a new Silverlight project, and put one of those controls in there. I found a couple of web services that could calculate routes, and added several features like route painting over the Bing Maps control. In three hours, I had a very primitive version of Silver Navigator, that allowed me to drive through Madrid without a problem.
As there was not anything like that in the marketplace yet, I decided to invest some hours on it, and after two or three weeks adding more features, a User Interface, and some other stuff, I published the first version of Silver Navigator on April, 2011. It wasn’t a full-featured GPS device, as maps and route calculation required an internet connection, but it did a pretty decent job inside cities, where signal always works, and in fact that’s where I most use GPS devices, instead of open roads.
The impact was remarkable. Downloads started to grow, and it stayed above 100 downloads per day for several months. I opened a Facebook page for it, where users could write their opinions, and that was a win with no doubt. People started to ask for new features, like voice guidance and automatic map rotation. As things were doing well, I decided to go further, and to implement those features, releasing a couple of new versions which had a great acceptance by the users.
Now, Silver Navigator has been downloaded almost 18.300 times, with a full version conversion rate of almost a 18%.

The numbers

Up to date (January 17th, 2012), the statistics of my applications are:
  • Windows Blocks: Total Downloads: 620           Conversion Rate: 10.1 %
  • Gravitards:         Total Downloads: 2512         Conversion Rate:  5.6 %
  • Silver Navigator: Total Downloads: 18269        Conversion Rate: 17.5 %
Note: What these numbers mean? All my applications in the Windows Phone Marketplace had a free/demo mode, that users can try first, and then decide to buy them or not. The conversion rate is the percentage of the total downloads that truly became sales.
So, as you can see, it’s been a great result for an indie developer, and even more if you think of the amount of hours and resources invested in the development of these applications. The effort/reward balance has been really positive:
  • Windows Blocks: Aprox. hours invested: 5      Total units sold up to date:  63
  • Gravitards:         Aprox. hours invested: 280   Total units sold up to date:  141
  • Silver Navigator: Aprox. hours invested: 240   Total units sold up to date:  3202

Hints to keep in mind when publishing an application

First, you should care about maximizing the visibility of your application in the Marketplace. This is influenced by many factors, like the number of total applications in there, how attractive it results for the users, etc. There are some things you cannot do anything about, like the number of apps in the marketplace, but you can help out in many others. In general, keep the following things in mind:
  • Try to think of a good name for your application. I failed in that with “Gravitards” (some people talked about the name, saying it reminded of “retard” or “retarded”, haha… :-).
  • Publish it in the appropriate category, as people uses categories to filter searches.
  • Put a lot of attention and detail to graphics and presentation of your application. Icons, pictures, and all media material should be well designed. It should be concise and clear, but also beautiful and attractive when possible. This is more important than you think…
  • Promote your application as much as you can. If you can afford it, pay for ads at Facebook or wherever you want. If you think you have a really good idea, contact your local Microsoft representative and ask for support. They are amazing, and will really help you if they can.
  • Give your users the chance to talk to you. Create a Facebook page for your application, and include a link on your app that takes you directly there.
  • Send the details of your application to most common mobile websites our there, like WMPowerUser, XDA Devs, etc etc. They do a great job reviewing apps.
  • Put a free/demo mode on your app. Give the users the chance to try it for free. Many people won’t pay without trying first.
Secondly, you will probably care about having the highest conversion rate possible. It’s nice to see that your application is being downloaded thousands of times, but it’s even nicer to see that becoming sales :)  !!!. So, to improve your conversion rate, keep in mind:
  • Your free/demo mode should be long enough to allow users trying the application well. But more importantly, it should be long and featured enough to make them want the full version. And this is important. If it’s too short, there might be not enough time for them to appreciate the app, and to get into it. If it’s too long, they might get the feeling that they had enough with the demo. In a game, for example, give them the chance to be playing for 10 or 15 minutes with the demo. I made this mistake with Gravitards, where the demo was only one level long (only 2-3 minutes playing), and people found that way too short.
  • Easy of use: this is crucial. Keep an eye on professional apps or games, and study how they are done. Why options are laid out that way, why menus have that shape. Everything is studied. Try to copy from the people that knows how to do it. Users should find easily what they want to do, with as few clicks as possible.
  • If it’s a game, keep an eye on difficulty level. This is very important, and very difficult to properly tune. If the game is too easy, people will get bored soon, may be even with the demo only, and will not buy the full version. If it’s too hard, it could be frustrating for users, and stop playing. However, if you are about to make this mistake, it’s better to make it a hard game than an easy game (there’s always people out there that takes that as a challenge).
  • Responsiveness of your application. Nowadays, people don’t tolerate slow or unresponsive applications. Easy as that. Everything should be fluid.
  • Localize your app to as many languages as possible, and of course include English as a minimum. Your app will be sold worldwide !!!
  • Consider including publicity in the free/demo version of your application. It’s a great way to make some cash with the free downloads.
  • Think of a reasonable price. It’s sometimes better to sell a lot of copies at a low price, than selling a few, more expensive copies.

Why do I think that Windows Phone is a GREAT platform to develop for?

There are many reasons, but some of them are:
  • Microsoft’s support to developers is great, with direct contact that really helps, continuous contests and prizes for developers, app promotion as “App of the week”, etc.
  • The number of Windows Phone devices in the market is raising amazingly. Specially since the Nokia Lumia came out, Windows Phone is now the hit. Everybody is talking about the Lumia.
  • Technically, there are very few hardware differences between WP7 devices, so you can be pretty sure that your application will work well on every device. This is a BIG problem in other platforms, like Android, were the phones are frustratingly segmented.
  • Microsoft offers development tools for free, like Visual Studio Expresss, XNA Game Studio, etc. The investment needed to start earning money from your developments is almost ZERO. And that doesn’t happen in any other platform.
  • You can re-use your WP developments for the XBox too, what is really great. Very soon, you will also have a Marketplace for Windows, what is going to be an awesome milestone in software development.
  • The technology behind your developments (.Net Framework, XNA Game Studio, Silverlight, etc), has a very affordable learning curve. In fact, it’s the easiest and most efficient platform in the market. And for free !!!
  • The development tools are, simply, the best. And this deserves an specific chapter.

Development tools

Microsoft is not a clear software leader in all fields. But in Development Tools, it is. I think that every software developer opinion is the same. Microsoft Visual Studio has no rival.

And this is no exception. The set of tools that you will use to develop for the Windows Phone is truly amazing (and free). The Windows Phone emulator is a masterpiece, with a mindblowing debugging speed. Those of you that have tried developing for Android, for example, know what I´m talking about.
If you plan to develop a game, the XNA Game Studio is simply awesome. It provides you with a full featured framework for game creation that allows you to develop last-gen games, again with a learning curve like no other.
If you plan to develop and application, Silverlight is again very cool. Last-gen user interfaces, beautifully animated and fluid, all with a .Net Framework basement, with thousands of classes ready for you, that will make your developments a piece of cake.
I have developed for Android for some time now, and believe me, it’s a frustrating experience compared to all of this.

My conclusion

If you are planning a new development for a mobile platform, Windows Phone has become THE way to go. When it first came out, it was soon positioned as a clear candidate and a tough competitor for iOS and Android. But now, in my modest opinion, it has no rival.
No matter if you are a pro developer or an indie one, the design and development period of your life-cycle will be much easier and shorter. Of course, if you have the resources to make a cross-platform development, and you can make your app to work in all iOS, Android and Windows Phone, go for it.
But if you’re a indie developer, or simply don’t need that level of compatibility, your best bet is WP. Currently, it is clearly the platform which requires the lowest initial investment (almost zero), the most efficient and easy (and therefore the one that requires less effort and work), and step by step it’s becoming the one with the highest return rates. You just need to check this blog post.
Cheers !!

Monday, 16 January 2012

Finding the external IP Address of your machine, with a timeout, in C#

If you try to find the IP Address your machine is using, you can follow two paths. The most obvious one is:
 string host = System.Net.Dns.GetHostName();
System.Net.IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(host);
System.Net.IPAddress[] addr = ipEntry.AddressList;
 for (int i = 0; i < addr.Length; i++)
      if (addr[i].AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork)
      return addr[i].ToString();
 return "";
Unfortunately, in most cases people are connected to the internet through a router, and therefore each machine is assigned with an internal IP Address of the private LAN network, assigning the external IP Address to the router only, not to each machine. Finding this external address directly is not trivial, as you would need to deal with the router itself, with different router models, etc.
The easiest way to find the external IP Address is to do a web request to one of the several websites out there specially designed to provide you with that address, like whatismyipaddress.com, www.whatismyip.com, etc. In this case, we will use the last one.
Of course, doing a web request can take time, specially if there is no internet connection available, as the default timeout can take several seconds. This function will do the job for you, and accept a custom timeout.
/// <summary>
/// This function uses a Web request to find the external IP Address your machine is using
/// </summary>
/// <param name="pTimeOutMiliSeconds">Number of miliseconds to wait for a response</param>
/// <returns></returns>
public static string GetExternalIP(int pTimeOutMiliSeconds)
   string whatIsMyIp = "http://automation.whatismyip.com/n09230945.asp";
   WebClient wc = new WebClient();
   UTF8Encoding utf8 = new UTF8Encoding();
      string ipaddr = null;
      bool done = false;
      wc.DownloadDataCompleted += new
      DownloadDataCompletedEventHandler((object sender, DownloadDataCompletedEventArgs e) =>
         ipaddr = utf8.GetString(e.Result);
         done = true;
      wc.DownloadDataAsync(new Uri(whatIsMyIp));
      System.DateTime startTime = System.DateTime.Now;
      while (!done)
         System.TimeSpan sp = System.DateTime.Now - startTime;
         // We should get a response in less than timeout. If not, we cancel all and return the internal IP Address
         if (sp.TotalMilliseconds > pTimeOutMiliSeconds)
            done = true;
      return ipaddr;
      return null;
      if (wc != null)
         wc = null;

It works pretty obviously. It just uses the DownloadDataAsync method, instead of the synchronous DownloadData, and waits for a certain amount of time. If no response is received in that time, cancels the async method and returns null.
Hope it helps!