Showing posts with label Windows Phone. Show all posts
Showing posts with label Windows Phone. Show all posts

Wednesday, 26 November 2014

Story of Pet Shows

Year 2012, October

We needed to find couple of concepts fast to present to an investor. I was playing a few different manager games at the time and we thought that manager game would be one possibility. Idea was to publish the game to Habbo hotel so we wanted to use a theme that suited both boys and girls. Our friend Ari gave us an idea to use pets as a theme and we liked it.

Basic idea behind the concept is to manage a team of pets. Pets have three different age phases. When they are puppies, player can train them, when they are adults, they can participate in competitions and when they are seniors they can breed with other pets to get new puppies.


It has taken about two years to complete the game. During that time almost everything has been rewritten or changed. Even tools that we use to create the game has been changed. Basic idea behind the concept is still there, but the whole game experience is totally different. Latest big change came at the beginning of this year when Pet Shows was accepted as AppCampus project. We added mini-games to the concept that are used to train the pets and to compete with other players teams.

This is just a beginning

Few days ago we got the news that AppCampus review team has accepted our release candidate and we can publish the game when we see fit. This is a huge step and allows us to continue to the next phase. Now we can start gathering feedback from the players. We will carefully go through the feedback and develop game further to give best possible experience for the players. It is hard to describe how exciting it is when you are just about to get real information from the real customers and to learn what they think about the game. All the feedback is good. If players don't like the game, we try to find out why and make the game better. If players like the game, then we are happy and continue to bring new features for them to enjoy.

Pet Shows

What is it about? Pet Shows is most probably different than you have used to see with pet themed games. The game has over 300 different pet profiles to collect, 5 different mini-games to attend and possibility to compete against other player teams from all over the world. It is about being best pet trainer in town. There is no payment wall and everything in the game can be achieved without using real money. Real money is used only to buy in game currency that can be used to help player to progress faster.

Pet Shows is now available in Windows Phone store. Check it out.

Wednesday, 19 March 2014

AppCampus

Today we reached our first #1 position in Windows Phone store in the card games category in Brazil. This is a good moment to look back at how we got here.

First concept

Already in 2011 we had an idea of collectible card game Permia - Tournaments. We started working with the title and in March 2012 we hada a working prototype of the game to show in Game Connection - America. (Concept demo) We met with over 20 publishers and most of them liked the idea behind the game. The concept was early stages and we were a brand new team so we did not manage to start co-operation with any of them. We believed in the concept and we continued working towards the closed beta launch. In June 2012 we launched the closed beta mostly because we promised to do so. It really was not in any shape for release, but it was something. At that time we concentrated on selling the idea to the publishers or some funding partners that could help us to continue with the product. For that purpose we produced a new trailer to be shown at Gamescom 2012. (Trailer)

The result was quite similar. People liked the concept but were not ready to take the risk with it. One of our last hopes for the product was AppCampus. They had started the program where they give grants for promising projects with a 6-month exclusivity period. They had an event here in Lappeenranta where they presented the program to us. We sent the application and started waiting for the results. After a couple of weeks they granted 20k€ for our project. That was not enough for us to really deliver the first idea of the concept, but it definitely helped us. It was part of the bigger picture where we managed to get a Tekes project approved as well.

Birth of Permia - Duels

We did not start immediately with the design milestone. The reason was that we really did not have enough resources to continue with the original concept and our hands were full with the other projects. Almost half a year passed before we were ready to continue with the program. One of the close colleagues came up with an new idea for more simple card game that might be more feasible to do with our resources. We created a design plan based on this new concept for AppCampus and they approved it. We were in a hurry because financially it was really tight situation at the time. In 3-4 months we passed the first release candidate to the AppCampus quality team and at the time they were not satisfied with it. There was one big feature missing and the quality of the game was not good enough. That was the first wake up call to really take Windows Phone environment seriously.

AppCademy

We continued to work with the missing feature and decided to apply for the AppCademy (AppCampus acceleration program). We were really sceptical about the acceleration program at first. One month away from home listening to lectures and coaching. Participation means that product would be on hold during that time. However, from the first day we were satisfied with the decision to join the program. We were given top level coaching in all areas from production to branding, marketing and user experience. The time spent there helped us go towards better quality than we would have been able to do without it.

Promotion

We don't have plenty of resources to promote our app. I think it is a same situation with most of the independent teams at start. Today it is crucial to get visibility for your app to have any possibility to really succeed in the market. After we released our game at December 2013 in Windows Phone store we really did not know what to expect. We knew that we have possibility to get some promotion from Microsoft and Nokia if we have good ratings. But the amount of support we have had from AppCampus program has been amazing. First month went almost on our own. It was Christmas time and we were little too late to be part of the Christmas promotions. We used that time well and noticed that downloads from Russia were progressing well without any promotion. We discussed with our Nokia contact about possibility to have local campaign in Russia that we will support by localizing the game. Our Nokia contact was successful and the result was whole week featured in Russia. At the same week we were featured all around the word and it was really good campaign for us. We still have most downloads from the Russia and they are really important market for us. After that we have worked closely with our Nokia contact to plan different campaigns and we have supported those campaigns with game content whenever it has been possible. We have updated the game often and have developed it further.

Final words

If we think about the support from AppCampus. The first thing is the grant. It can be something from 20k€ to 70k€. Money is always welcome and helps. The real difference comes from the other forms of support. They really push for the quality and help us developers to get good ratings with better quality apps. AppCademy is excellent acceleration program and is valued much more than any grant they give. And after those they put so much effort to really help us to promote our apps in store. That is something that is hard to buy with the money. I can imagine that without them Permia - Duels would not have over 260 000 downloads today and our #1 store position in Brazil.

Big thanks to the AppCampus staff. You have been a great asset on our journey to app developer. You have shown the possibilities that are in Windows Phone environment and we are really happy to be part of the program.

Wednesday, 29 January 2014

Our first mobile release

The last two years have been all about learning. Now we have encountered yet another possibility to learn when we launched our collectible card game Permia - Duels in Windows Phone store at 14 Dec 2013. After about one and a half months and almost 100 000 downloads later we have had first few small ideas what it means to publish a game in a mobile market place.

Earlier we only had experience of releasing game in a small social network Habbo hotel and it has been very much different experience.


Update delay
First of all, we cannot update the game currently whenever we want to. We have not yet implemented the feature that allows us to update the content for the game directly without going through store certification. That is something we definitely want to do in the future. Already we had an issue where Lumia black update changed the way some configuration for the viewport of the game were defined and our game was broken for all the high end devices with HD resolution. You can imagine how grateful I am for Microsoft Store certification team that handled the update in two days instead of one week just before our promotion all over the world started.  All the previous review periods were closer to that one week. Even if the certification goes as fast every time in the future it is still at least couple of days after we have the new version ready before the players can use it.

Analytics
All the data we gather from the game and feedback that we follow have helped us to react to the problems much quicker than it would have been possible without these. We have found couple of bottlenecks in our server code after the release and both times it has been the same. First active user tells that something does not work like it should. Then our ratings start to decrease. These are enough reason to start studying what is the problem. Then simple analytics that we gather from the game pinpoints the place where the problem lies. Both times we were able to fix the bottlenecks in one day after they first started to encounter. For the team that is as small as us I feel that it is amazing to react that fast.

Ratings
These seem to have power of the god. When we did not ask our players to rate us at all, we mostly got bad ratings. It seems that people remember to tell if they don't like the game or the game does not work much more often than if they like the game and we don't remind them to do that. Permia - Duels average rating was less than 4 before we implementeda "rate us" dialog in the game. We don't want to interrupt the player, but it is crucial for our game to have good ratings. Without good ratings, we don't get promotion from Microsoft. Without good ratings, players do not download the game and because our game is multiplayer game, our game cannot live without plenty of players. Everything starts from ratings. How cruel that is when you are not going to buy those ratings for you. We don't want to buy ratings so we decided to add the dialog. After we had the rate us dialog in the game our ratings have gone up to 4.4 average and still growing. We have had much more ratings than before and it has helped us to get promotion and more importantly the players as well. Yet another story is that only good rating is five stars. All the other will weight ratings in wrong direction. Average 4.3 is minimum that is expected from us.

Reviews
We had an excellent review from WPCentral. We advertised that in our Facebook and Twitter accounts. One day after that we got an excellent review from WP player ratings. We advertised that as well in our Facebook account. I was quite amazed how big difference was with the impact those messages had. The player review was seen by six times more people than the WPCentral one. With this case it seems that people are more interested about what other people say than what media says. The article in WPCentral reminded us about importance of the social media. We really have not been active enough to promote our social media sites. We have had over 1 000 000 players playing our games and we have little over 160 people that likes our Facebook page and little less than 100 people who follows our Twitter. We will test with next update if we can get little more players to follow us because social media is currently best way to notify our players what is happening.



Some final words
I have to say that we feel very welcome in Windows Phone environment. All the great feedback has given us strength and motivation to continue with the path we have taken. We are long way from the product we have in our vision. With the help of the players we will go towards that vision and continue delivering new features one by one. First couple of months we will use to make sure that everything works like it should. We create small adjustments to the game and after we are satisfied with the maturity we will start bringing new features to the game. If you have Windows Phone 8 and you have not yet downloaded the game, now is the perfect time to download it. :)



Sunday, 13 October 2013

Cloud service: Windows Phone application - receipt verification

Introduction

It's time to share also something from our "technical" journey. As you may have already noticed from the earlier blog posts, our current focus has been to get Permia - Duels to work in Windows Phone, which will naturally mean that we need integrate a few modules into our cloud service to have an interface towards the Windows Phone "ecosystem".

Mobile purchase verification is an important feature that is needed to make sure that the subscriber has really purchased what it clams. In Windows Phone environment it means receipt verification. Sounds like a pretty simple feature, which it is in fact is: get receipt and verify it.

In general, the Microsoft MSDN Dev Center has instructions, guides and examples how the receipt verification works in Windows Phone, but I did find that the web pages are more or less not so well structured. I had to combine several sources to get a good idea how the verification should work and even after that "the final" solution it did not work. Well, after all we got it to work.

One notable thing is, that we had to implement almost everything by ourselves. There were lots of different kinds of implementation, but mostly those were not directly suitable for our use. As a background information, our cloud service is build up with  C/C++ and LUA scripting language, but we have also ways to extend it to use other technologies. I am going to write another post about that, so let's have a more closer look those topics then.

Receipt verification

Very first thing I did, was using search engines to find pages with keywords "Microsoft receipt verification".  I was lead to Microsoft's Dev Center web page Using receipts to verify purchases. There was a nice example in pseudo level (for me), as we are not using C# in our cloud service. Now I had an idea that in what format the receipt is received and in pseudo level what should be done.

XMLSig handling


Next step was to get further information about the receipt. The receipt is in fact an XML document having a signature element in it. There is a W3C Recommendation about XML signature syntax and I had to spend some time to get an idea how it was supposed to be used. Fortunately, I did find one nice web page, that did demonstrated how the XML signature works: Signing an XML document using XMLDSIG
The guide is split into two parts. Part 1 explains "enveloping" a signature while part 2 explains an "enveloped" signature. Microsoft receipt uses an "enveloped" signature, but it is also worth checking part 1 to get a general idea what it means.

It took a while to I implement what was needed for this, but in the end I had the needed pieces in place. I got the example from the article to work and the verification worked fine.

Fetching Certificate For Receipt Verification


Next, I started to study Microsoft's example from  Using receipts to verify purchases, and build up the certification fetch logic and used certificates to test my implementation. Below we have a receipt example and an example of HTTP messaging from certification fetch.

<receipt certificateid="b809e47cd0110a4db043b3f73e83acd917fe1336" receiptdate="2012-08-30T23:10:05Z" receiptdeviceid="4e362949-acc3-fe3a-e71b-89893eb4f528" version="1.0">
 <appreceipt appid="55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr" id="8ffa256d-eca8-712a-7cf8-cbf5522df24b" licensetype="Full" purchasedate="2012-06-04T23:07:24Z">
 <productreceipt appid="55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr" expirationdate="2012-09-02T23:08:49Z" id="6bbf4366-6fb2-8be8-7947-92fd5f683530" productid="Product1" producttype="Durable" purchasedate="2012-08-30T23:08:52Z">
 <signature xmlns="http://www.w3.org/2000/09/xmldsig#">
  <signedinfo>
   <canonicalizationmethod algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
   <signaturemethod algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256">
   <reference uri="">
    <transforms>
     <transform algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature">
    </transform></transforms>
    <digestmethod algorithm="http://www.w3.org/2001/04/xmlenc#sha256">
    <digestvalue>cdiU06eD8X/w1aGCHeaGCG9w/kWZ8I099rw4mmPpvdU=</digestvalue>
   </digestmethod></reference>
  </signaturemethod></canonicalizationmethod></signedinfo>  <signaturevalue>SjRIxS/2r2P6ZdgaR9bwUSa6ZItYYFpKLJZrnAa3zkMylbiWjh9oZGGng2p6/gtBHC2dSTZlLbqnysJjl7mQp/A3wKaIkzjyRXv3kxoVaSV0pkqiPt04cIfFTP0JZkE5QD/vYxiWjeyGp1dThEM2RV811sRWvmEs/hHhVxb32e8xCLtpALYx3a9lW51zRJJN0eNdPAvNoiCJlnogAoTToUQLHs72I1dECnSbeNPXiG7klpy5boKKMCZfnVXXkneWvVFtAA1h2sB7ll40LEHO4oYN6VzD+uKd76QOgGmsu9iGVyRvvmMtahvtL1/pxoxsTRedhKq6zrzCfT8qfh3C1w==</signaturevalue>
 </signature>
</productreceipt></appreceipt></receipt>


First the real location of the certificate was queried from the "redirection" service (https://go.microsoft.com/fwlink/?LinkId=246509&cid=b809e47cd0110a4db043b3f73e83acd917fe1336) :

GET /fwlink/?LinkId=246509&cid=b809e47cd0110a4db043b3f73e83acd917fe1336&lt HTTP/1.1\r\n
Host: go.microsoft.com\r\n
User-Agent: seepia-rozelayde-ms-be/0.0.1\r\n
Content-Length: 0\r\n
\r\n

HTTP/1.1 302 Found\r\n
Cache-Control: private\r\n
Content-Type: text/html; charset=utf-8\r\n
Expires: Fri, 11 Oct 2013 07:26:01 GMT\r\n
Location: https://lic.apps.microsoft.com/licensing/certificateserver/?cid=b809e47cd0110a4db043b3f73e83acd917fe1336\r\n
Server: Microsoft-IIS/7.5\r\n
X-AspNet-Version: 4.0.30319\r\n
X-Powered-By: ASP.NET\r\n
Date: Fri, 11 Oct 2013 07:27:00 GMT\r\n
Content-Length: 221\r\n
\r\n
<html><head><title>Object moved</title></head><body>\r\n
<h2>
Object moved to <a href="https://lic.apps.microsoft.com/licensing/certificateserver/?cid=b809e47cd0110a4db043b3f73e83acd917fe1336">here</a>.</h2>
\r\n


GET /licensing/certificateserver/?cid=b809e47cd0110a4db043b3f73e83acd917fe1336 HTTP/1.1\r\n
Host: lic.apps.microsoft.com\r\n
User-Agent: seepia-rozelayde-ms-be/0.0.1\r\n
Content-Length: 0\r\n
\r\n

HTTP/1.1 200 OK\r\n
Cache-Control: private\r\n
Content-Type: text/plain\r\n
Server: Microsoft-IIS/7.5\r\n
X-AspNetMvc-Version: 2.0\r\n
X-AspNet-Version: 4.0.30319\r\n
X-Powered-By: ASP.NET\r\nDate: Fri, 11 Oct 2013 07:27:01 GMT\r\n
Content-Length: 1398\r\n
\r\n
-----BEGIN CERTIFICATE-----\r\n
MIIDyTCCArGgAwIBAgIQNP+YKvSo8IVArhlhpgc/xjANBgkqhkiG9w0BAQsFADCB\r\n
jjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xEDAOBgNVBAcMB1Jl\r\n
ZG1vbmQxHjAcBgNVBAoMFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEWMBQGA1UECwwN\r\n
V2luZG93cyBTdG9yZTEgMB4GA1UEAwwXV2luZG93cyBTdG9yZSBMaWNlbnNpbmcw\r\n
HhcNMTExMTE3MjMwNTAyWhcNMzYxMTEwMjMxMzQ0WjCBjjELMAkGA1UEBhMCVVMx\r\n
EzARBgNVBAgMCldhc2hpbmd0b24xEDAOBgNVBAcMB1JlZG1vbmQxHjAcBgNVBAoM\r\n
FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEWMBQGA1UECwwNV2luZG93cyBTdG9yZTEg\r\n
MB4GA1UEAwwXV2luZG93cyBTdG9yZSBMaWNlbnNpbmcwggEiMA0GCSqGSIb3DQEB\r\n
AQUAA4IBDwAwggEKAoIBAQCcr4/vgqZFtzMqy3jO0XHjBUNx6j7ZTXEnNpLl2VSe\r\n
zVQA9KK2RlvroXKhYMUUdJpw+txm1mqi/W7D9QOYTq1e83GLhWC9IRh/OSmSYt0e\r\n
kgVLB+icyRH3dtpYcJ5sspU2huPf4I/Nc06OuXlMsD9MU4Ug9IBD2HSDBEquhGRo\r\n
xV64YuEH4645oB14LlEay0+JZlkKZ/mVhx/sdzSBfrda1X/Ckc7SOgnTSM3d/DnO\r\n
5DKwV2WYn+7i/rBqe4/op6IqQMrPpHyem9Sny+i0xiUMA+1IwkX0hs0gvHM6zDww\r\n
TMDiTapbCy9LnmMx65oMq56hhsQydLEmquq8lVYUDEzLAgMBAAGjITAfMB0GA1Ud\r\n
DgQWBBREzrOBz7zw+HWskxonOXAPMa6+NzANBgkqhkiG9w0BAQsFAAOCAQEAeVtN\r\n
4c6muxO6yfht9SaxEfleUBIjGfe0ewLBp00Ix7b7ldJ/lUQcA6y+Drrl7vjmkHQK\r\n
OU3uZiFbCxTvgTcoz9o+1rzR/WPXmqH5bqu6ua/UrobGKavAScqqI/G6o56Xmx/y\r\n
oErWN0VapN370crKJvNWxh3yw8DCl+W0EcVRiWX5lFsMBNBbVpK4Whp+VhkSJilu\r\n
iRpe1B35Q8EqOz/4RQkOpVI0dREnuSYkBy/h2ggCtiQ5yfvH5zCdcfhFednYDevS\r\n
axmt3W5WuHz8zglkg+OQ3qpXaXySRlrmLdxEmWu2MOiZbQkU2ZjBSQmvFAOy0dd6\r\n
P1YLS4+Eyh5drQJc0Q==\r\n
-----END CERTIFICATE-----
Now our cloud service was able to fetch the certificate that was needed to verify the receipt.

Receipt verification: failure and solution


I failed to get the verification of the example receipt to work. I spent a "few" hours to verify the logic and retested with different scenarios. Then finally I got it: the receipt was in wrong format, as all hash calculations were based on a receipt where there were no newlines or spaces between the XML nodes. I don't know if I missed something while reading the Microsoft Dev Center pages or XMLSig recommendation's canonicalization definitions, but also the Microsoft beta server sent the receipt in this format.

Real format of Receipt:

<receipt certificateid="b809e47cd0110a4db043b3f73e83acd917fe1336" receiptdate="2012-08-30T23:10:05Z" receiptdeviceid="4e362949-acc3-fe3a-e71b-89893eb4f528" version="1.0"><appreceipt appid="55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr" id="8ffa256d-eca8-712a-7cf8-cbf5522df24b" licensetype="Full" purchasedate="2012-06-04T23:07:24Z"><productreceipt appid="55428GreenlakeApps.CurrentAppSimulatorEventTest_z7q3q7z11crfr" expirationdate="2012-09-02T23:08:49Z" id="6bbf4366-6fb2-8be8-7947-92fd5f683530" productid="Product1" producttype="Durable" purchasedate="2012-08-30T23:08:52Z"><signature xmlns="http://www.w3.org/2000/09/xmldsig#"><signedinfo><canonicalizationmethod algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"><signaturemethod algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"><reference uri=""><transforms><transform algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></transform></transforms><digestmethod algorithm="http://www.w3.org/2001/04/xmlenc#sha256"><digestvalue>cdiU06eD8X/w1aGCHeaGCG9w/kWZ8I099rw4mmPpvdU=</digestvalue></digestmethod></reference></signaturemethod></canonicalizationmethod></signedinfo>  <signaturevalue>SjRIxS/2r2P6ZdgaR9bwUSa6ZItYYFpKLJZrnAa3zkMylbiWjh9oZGGng2p6/gtBHC2dSTZlLbqnysJjl7mQp/A3wKaIkzjyRXv3kxoVaSV0pkqiPt04cIfFTP0JZkE5QD/vYxiWjeyGp1dThEM2RV811sRWvmEs/hHhVxb32e8xCLtpALYx3a9lW51zRJJN0eNdPAvNoiCJlnogAoTToUQLHs72I1dECnSbeNPXiG7klpy5boKKMCZfnVXXkneWvVFtAA1h2sB7ll40LEHO4oYN6VzD+uKd76QOgGmsu9iGVyRvvmMtahvtL1/pxoxsTRedhKq6zrzCfT8qfh3C1w==</signaturevalue></signature></productreceipt></appreceipt></receipt>


YESH! Now the receipt verification worked with example receipt.

Windows Phone Store service & beta testing certificate


Nothing new on the planet, but we ran into more problems when we tried to verify that the receipt was received during beta testing. The problem was that the certification fetch failed for certification ID "A656B9B1B3AA509EEA30222E6D5E7DBDA9822DCD". I tried to search for a solution by using search engines and certificate ID as a search keyword, but no luck.

Then we sent a question to the community (Discussion Thread) and finally there was an answer that helped us. I could get a certificate for "A656B9B1B3AA509EEA30222E6D5E7DBDA9822DCD" from inside one sample In-app purchase receipt verification. I admit that having visited this page before, but I somehow had missed / not read the example so well. In fact in In-app purchase receipt verification page there is a statement:

Note:
The IapReceiptProduction.cer certificate file is used to verify a live in-app purchase receipt from the Windows Phone Store service.

My opinion is that Windows Phone Store service certificate is not "visible" enough and searches with keyword "A656B9B1B3AA509EEA30222E6D5E7DBDA9822DCD" will not give good results to resolve the problems I had.

We still have a one open topic. During beta testing, there was received a Receipt, that was somehow malformed, as there was missing " from XML node arguments (argument was in next format: NameOfArgument=realdata"). Our parser did not like it and when I added "-mark manually, hash calculations did fail. I have to check the issue in some point, and hopefully I manage to solve this issue soon.

Conclusion

Maybe nowadays there is a well-implemented and optimized XML parser, which runs smoothly in the newest hardware, but in general I would not like to use XML in cloud service / backend / server-side, as it is not so lightweight as well-defined "binary" formats.

This is not the only feature where Microsoft uses the XML approach and in fact it seems that Microsoft's approach to these issues is XML-driven. This is my current view, but let's see what future brings.

From the receipt verification point of view it is not such a big deal to use XML and XMLSig, as the receipt verification is not performed so often and should not cause problems to the cloud service. Hopefully our lightway implementation works for a long time and is robust if/when there are changes to the receipts. Anyway we had to also implement a backup system for the case where the receipt verification fails, so users won't lose their purchases.

Links:



If you have any questions related to this topic, just ask it via comments..