Game Publishing

Exclusive offer: get 50% off this eBook here
Windows Phone 8 Game Development

Windows Phone 8 Game Development — Save 50%

A practical guide to creating games for the Windows Phone 8 platform with this book and ebook

$29.99    $15.00
by Marcin Jamro | September 2013 |

In this article by Marcin Jamro, author of Windows Phone 8 Game Development, we will learn how to test the application and prepare it for submission. The process of testing the game may be very complex, but it can be made easier by using dedicated tools, which will be presented in this article. While developing the game for the Windows Phone 8 platform, we should carefully test various aspects, including using sensors, different screen resolutions, localization, and, of course, the performance.

(For more resources related to this topic, see here.)

Manifest file

Many application details are specified in the manifest file. Thus, we will modify it to set the correct application name, description, as well as choose suitable tile images. we can adjust these settings on the Application UI page in the Manifest Designer.

Basic configuration

As presented in the following screenshot, set the Display Name field to Space Aim 3D, and adjust the Description field as well. What is more, we should choose the suitable App Icon, which is an image with size 100 x 100 pixels. It represents our application, thus we should provide the game with a proper icon that the user can easily recognize.

In the exemplary game, the icon shows the planet and a few asteroids, which are the main elements in the game. What is more, the image contains the game title. It is important, because we clear the content of the Tile Title setting. Thus the user will not see additional small text with a name of the application, after pinning the tile to the Start screen.


Apart from some basic settings, we can also choose tile images. They will be shown on the default tile when the player taps the game to the Start screen.

we can also create secondary tiles, which could navigate to particular locations inside the application. However, such a solution is not shown in this article.

The Windows Phone 8 platform supports three kinds of tile templates: flip, iconic, and cycle. They differ by a way of presenting content. Of course, we can select a suitable one also in the Manifest Designer by choosing an option from the Tile Template list.

The flip tile template is the default option, which allows we to present two sides of the tile and flip between them. Thus, we can present the game logo on the front side and some more information on the other side. The tile flips automatically. we can specify settings regarding the background images, titles shown on the front and back sides, the content presented on the other side, as well as the number displayed on the tile.

The iconic tile template shows the content in a bit different way. Here, a small icon is used to present the application, together with an optional number, for example, regarding received messages in our project. Of course, we can set some properties, including the tile title, the image, as well as the background color.

The cycle tile template is the last available type, which makes it possible to present up to nine images that are changed automatically. Thus, it can be a suitable way to present a tile for the application which works with many images. In case of the cycle tile template, we can also adjust a few settings, such as the title or the shown images.

Tiles can be available in three sizes: small (159 x 159 pixels), medium (336 x 336), and large (691 x 336). The small and medium ones are mandatory, while the large one is optional.

With the usage of the Manifest Designer, it is very easy to prepare the basic version of the default tile for the application, just by selecting a suitable template type and choosing images which should be shown on the tile, depending on its size. we can also enable or disable the support for a large tile.

After adjusting the tiles, we may receive a result as shown in the following screenshot:

As we can see, the tile is presented in three various sizes: small, medium, and large. What is important, we do not just rescale the image, but provide three separate images in particular sizes, which look good regardless of the tile size. Here, we can also find the Space Aim 3D shortcut in the application list. However, we can expect that it appears in the Games group instead. Fortunately, we do not need to worry about it, because after downloading the game from the store, its shortcut will be shown in the proper place.

As we could remember, the flip data template, which we chose, can present two sides of the tile, but now we do not see this effect. Thus, in the following part of this section we will learn how to configure the default tile to support flipping and how to set the background image and the content at the back. To do so, we should open the WMAppManifest.xml file, but not in the Manifest Designer. we need to choose the View Code option from the context menu of this file.

What is interesting, the XML code contains information that we had set in a graphical way. Thus, it can be an additional way of adjusting some settings and adding more complex features, which are not supported directly by the Manifest Designer. The TemplateFlip node, specified in the WMAppManifest.xml file, is as follows:

<TemplateFlip> <SmallImageURI (...)> (...) </SmallImageURI> <Count>0</Count> <BackgroundImageURI (...)> (...) </BackgroundImageURI> <Title></Title> <BackContent>Let's avoid asteroids and reach the target planet!</BackContent> <BackBackgroundImageURI></BackBackgroundImageURI> <BackTitle>Space Aim 3D</BackTitle> <LargeBackgroundImageURI (...)> (...) </LargeBackgroundImageURI> <LargeBackContent>Let's avoid asteroids, reach the target planet, and see players in the vicinity!</LargeBackContent> <LargeBackBackgroundImageURI(...)></LargeBackBackgroundImageURI> <DeviceLockImageURI></DeviceLockImageURI> <HasLarge>True</HasLarge> </TemplateFlip>

Here, we specify the BackContent, BackTitle, and LargeBackContent elements to adjust a way of presenting the back side of the tile. The first setting is a string which will be displayed on the other side of the medium-sized tile. The second setting is the title shown on the back side (regardless of the tile size), while the other is a string shown on the large tile.

When we deploy the application to the emulator or the phone, and tap it to the start screen, we should see that the tile flips automatically, and it should present some additional content on the back side. What is more, it differs depending on the tile size, as shown in the following screenshots:

The Windows Phone 8 platform also supports live tiles, which present the content received from the Internet and are updated automatically. Such a kind of tiles can use either the push notifications or the local notifications.

Remaining settings

we have completed the basic configuration of the application, as well as learned how to set up the default tile. However, a few other modifications are necessary on the Packaging tab. Here, we specify the author and publisher data, as well as a version of the application. Other tabs (Capabilities and Requirements) remain unchanged, because we made the required modifications earlier.

Rating by the users

While designing the web screen, we created the button which should allow the user to rate the game. we can easily implement this functionality with the MarketplaceReviewTask class, which is another launcher used in the exemplary game. we need to modify the Rate method of the webViewModel class, as shown in the following code snippet:

private void Rate() { MarketplaceReviewTask task = new MarketplaceReviewTask(); task.Show(); }

Here, we create a new instance of the MarketplaceReviewTask class (from the Microsoft.Phone.Tasks namespace) and call the Show method. When this part of code is executed, the review page is opened, where the user can rate and review the current application.

Release version

The development environment for programming the Windows Phone 8 applications is equipped with many advanced features regarding their debugging. Such functionalities may require a bit different form of the code, which can be executed slower, but provide the developers with additional possibilities during development. For this reason, it is important to prepare the release version (retail) of the game before publishing.

we can easily generate the release version of the .xap file (with the data of wer application) using the IDE. To do it, we should change two options located next to the green triangle, and a selection of the emulator or device, as shown in the following screenshot. Here, we should indicate that we want to use the Release mode, as well as the ARM platform. Then, we should select Build and Rebuild Solution options to generate the suitable version of the .xap file. Now, we can proceed to the process of testing our game and preparing for submission to the store!

Store Test Kit

Some testing operations are simplified by the Store Test Kit, which allows to perform a set of automatic and manual tests. They can be used to verify many requirements that should be met to accept the application in the store.

we can open the tool by choosing the Open Store Test Kit option from the context menu of the SpaceAim3D project (not solution), or by choosing the Open Store Test Kit entry from the Project menu. The tool contains three pages: Application Details, Automated Tests, and Manual Tests. we will learn how to use all of them in this section.

Application details

In the first page we should specify some details regarding the application, including the store tile image with size 300 x 300 pixels. Apart from it, we need to choose a set of screenshots for each supported screen resolution. It is important to add at least one screenshot and not more than eight. Each of them should be provided in proper resolution, that is, 480 x 800 (WVGA), 768 x 1280 (WXGA), and 720 x 1280 (720P).

The Application Details page is shown in the following screenshot:

In case of applications running in the landscape mode (as in case of wer game), we should provide images that are not rotated, that is, as captured in the emulator.

we can make screenshots either in the emulator (using the Screenshot tab in the Additional Tools window) or on the phone. In the latter case, we should press the Start and power buttons. When a screenshot is taken correctly, a shutter sound is played and the image is saved in a suitable album.

The Application Package field is a read-only textbox, where a path to the .xap file is shown. It is worth mentioning that it indicates the Release version for ARM, thus it is exactly the same version as we generated earlier.

Automated tests

The second page is named Automated Tests. By clicking on the Run Tests button, we run a basic verification of wer project regarding the submission requirements, for example, whether the .xap file size is correct, as well as we provide the suitable icons and screenshots. If all tests are passed, we will receive a result as shown in the following screenshot. Otherwise, some additional notes are shown. In such a situation, we need to fix errors and run the tests once again.

It is important to note that passing all automated tests does not mean that the application does not contain any errors which could prevent the project from being accepted in the store.

Manual tests

Additional verification can be performed manually, by using the Manual Tests tab in the Store Test Kit. Here, we have a list of test cases and their descriptions. we should follow them and manually indicate whether the test is passed or failed as shown in the following screenshot:

Simulation Dashboard

The exemplary game may be used in various conditions, often significantly different than our testing environment. For instance, the player can have a limited access to the Internet or switched off the location services. For this reason, we should try to test our project in many situations. Such a process can be simplified by the Simulation Dashboard tool. we can open it by choosing the Simulation Dashboard option from the Tools menu. Its window is shown in the following screenshot:

This tool makes it possible to simulate some specific network conditions, by choosing a proper network speed and signal strength. we can choose 2G, 3G, 4G, Wi-Fi, and No Network options as the speed, as well as Good, Average, and Poor as the Signal Strength. Thus, we can check how our application behaves if we need to download some data from the Internet using the slower network connection, or even whether the game responds correctly in case of no network access.

Apart from the network simulation, the Simulation Dashboard allows we to lock and unlock the screen just by choosing a suitable option from the Lock Screen group.

The last supported testing feature is named Reminders. Just after pressing the Trigger Reminder button, the reminder is shown in the emulator. Thus, we can easily check how wer application reacts in such a situation.

Windows Phone Application Analysis

Apart from testing the project in real-world conditions, it is important to check its performance and try to eliminate problems in this area. Fortunately, the Windows Phone Application Analysis tool is integrated with the IDE, and we can use it to measure the performance of various parts of our game. The tool can be started by selecting the Start Windows Phone Application Analysis option from the Debug menu.

After launching, we should have the Execution option selected, thus we can click on the Start Session (App will start) element. It automatically starts our game in the emulator, if it is selected as the target. Then, a process of collecting data is started, and we can use the application in various ways to check the performance of its several areas. For instance, we can start by spending some time on the Menu screen, then we launch the game and play ten levels, return to the menu, and open additional screens (such as Ranks, Map, or World). When we want to finish collecting performance data, we should click on the End Session (App will exit) option. Then, the process of collecting data stops and the report is created, which can take some time.

The .sap file is generated for each analysis session. It is saved in the directory of the managed project, and can be later opened and analyzed using the IDE.

The Windows Phone Application Analysis tool presents a lot of important data related to the game performance, including both the managed and the native parts. The graph, presented in the main part of the window, shows the CPU usage at a particular time, as shown in the following screenshot. we can easily analyze which part of our application causes performance issues, and we may try to improve them.

As we can see in the preceding screenshot, the performance results for the Space Aim 3D game are expectable and reasonable. In case of the Menu screen, the CPU usage is very low. It grows significantly for the Game page, but here we need to perform a lot of operations, for example, related to rendering many objects in the 3D game world. What is interesting, the CPU usage grows slightly while consecutive levels, but also on the tenth level, the game works smoothly both in the emulator and on the phone. As soon as we exit to the main menu, the CPU usage decreases almost immediately. The remaining part is related to opening the following game screens: Ranks, Map, World, and others.

The possibilities of the Windows Phone Application Analysis are not limited only to drawing the graph of the CPU usage. we can also see the Hot Path information, which lets us know what part of code uses the most processing power. In our case, it is the region that renders 3D objects on the screen, using Direct3D. What is more, we can click on a name of the particular function to open another view, which shows more details. By using the tool, we can even analyze the performance of particular lines of code, as shown in the following screenshot:

Available features make it significantly easier to find a bottleneck causing performance problems. By running the Windows Phone Application Analysis tool multiple times, while making modifications in the code, we can see how wer changes reflect in the performance.

Windows Phone 8 Game Development A practical guide to creating games for the Windows Phone 8 platform with this book and ebook
Published: September 2013
eBook Price: $29.99
Book Price: $49.99
See more
Select your format and quantity:

Frame rate counters

In this article we learned how to use a few tools for testing the application, but we have already used one that also has some features related to testing. It is the emulator, which can show a few numbers next to the edge. They are named frame rate counters and are shown in the following screenshot:

The debugger type for UI task should be set to Managed Only to see the frame rate counters. we can adjust this setting in the managed project properties.

The first two values represent the number of frames per second for updating the screen (the first one) and running of the UI thread (the other). Apart from them, we can monitor some additional results, including the texture memory usage.

Certification requirements

Each application submitted to the store should meet many requirements, specified at the website. They are related to various aspects and are divided into some groups, including:

we should carefully read these policies before submitting the application to the store and adjust the project to comply with all applicable ones. The exemplary game is related to many requirements, including the following:

  • your app must provide in-app settings that allow the user to enable and disable wer app's access to and use of location from the Location Service API (point 2.7.3)
  • Game apps must be categorized as Games (point 3.11)
  • The app must be compiled using retail configuration instead of debug. The app must not contain debugging symbols or output (point 4.2.3)
  • For each app, we must provide at least one or up to a maximum of eight screenshots for each supported screen resolution (point 4.6)
  • The app must render the first screen within 5 seconds after launch (point 5.2.1)
  • For games, when the Back button is pressed during gameplay, the game can choose to present a pause context menu or dialog or navigate the user to the prior menu screen. Pressing the Back button again while in a paused context menu or dialog closes the menu or dialog (point

Of course, many requirements are common for various types of applications, such as a necessity of a quick launch. However, some of them are dedicated to particular kinds of projects, including applications that run under a locked screen, share photos, as well as play background audio. we should check which requirements are related to our application, and ensure that all of them are met before publishing.

Publishing in the store

When we complete testing wer game, we can start the submission process. It contains many stages and part of them is presented in the following diagram (based on

The process starts with the Not completed status. Then, it changes to, for example, Signing passed and Certification passed. At the end, the submission process is in the Published state. Of course, some problems can occur while analyzing the application before publishing in the Windows Phone Store. Then, the process can be moved to some other states (for example, Signing failed or Certification failed).

we can get the current state of the submission process using Dashboard.

Application information

To start the submission process, open the website, navigate to Dashboard, and click on the Submit app and App info options. Then, we can specify the application alias (defining how the application is named in the Dev Center, for example, Space Aim 3D), category (for example, games), subcategory (for example, action + adventure), as well as choose a suitable pricing, market distribution, and distribution channels.

The Windows Phone 8 applications and games can be distributed in two ways: beta and in the public store, as presented in the following diagram:

In the beta testing, the application can be downloaded and installed only by a limited set of beta testers, defined by the author of the submission. What is more, the application is not visible in the store while browsing through it. Regarding the public release, anyone can access our game, of course according to some additional restrictions set in application details.

Using the beta testing mechanism is a very good way to improve the quality of the final version of our application or game. Additional beta testers could find errors, propose changes, and give we great feedback that could be beneficial for the further work on the project. It is important that the beta version will automatically expire after 90 days since its first submission. What is more, the beta testers need Microsoft accounts.

we can also decide whether our game should be automatically available in the store as soon as it is certified or we will add it manually later. The trial version of wer project can be prepared as well. Thus, the users can try it for free, but with a limited functionality or for a limited period of time. While submitting the game, we can also select game ratings certificates, which may be required in some countries. Of course, various settings mentioned earlier can be either active or inactive depending on previous selections. At the end, click on the Save button.

Map credentials

The last required modifications in the code, which we need to take before submitting the .xap file, are related to configuration of the map services. They should use correct credentials, which we can obtain from the Windows Phone Dev Center. To do so, click on the Map services and Get token options. Then, let's save the generated values, namely Map service ApplicationID and Map service AuthenticationToken. At the end, click on the Close button.

The Map services option is unavailable for beta applications.

View model

The process of setting the proper application ID and authentication token will be performed by the MapViewModel class. Here, we should add two private constant fields representing these settings (MAP_APPLICATION_ID and MAP_AUTHENTICATION_TOKEN) and assign them the values obtained earlier from the Windows Phone Dev Center.

Then, we should prepare the SetMapCredentials method, which updates the maps settings. Here, we set new values of the ApplicationId and AuthenticationToken properties, as shown in the following code:

public void SetMapCredentials() { MapsSettings.ApplicationContext.ApplicationId = MAP_APPLICATION_ID; MapsSettings.ApplicationContext.AuthenticationToken = MAP_AUTHENTICATION_TOKEN; }


we need to set the credentials when the Map control is loaded. Thus, we handle the Loaded event (in the MapPage.xaml file), as shown in the following code snippet:

<Controls:Map (...) Loaded="MapPlayers_Loaded" > (...) </Controls:Map>

Then, we call the SetMapCredentials method (on the MapViewModel instance) inside MapPlayers_Loaded.

we should not forget to rebuild the project (for ARM platform in the Release mode) to create the new version of the .xap file for submission.

XAP submission

Now we can proceed towards submitting the .xap file, by choosing the Upload and describe our XAP(s) option. When the page is loaded, click on the Add new hyperlink, and select the .xap file. Then, the uploading process is started. we need to wait until it is completed, which can take some time, depending on the file size. It is worth mentioning that the maximum size of the .xap file is 1 GB.

The .xap file (for example, SpaceAim3D_Release_ARM.xap) should be available in the Bin\ARM\Release folder inside the directory of the managed project.

After uploading, we need to complete the form with the data regarding the project. Here, we specify, for example, the version number, description, as well as URL of website with the privacy policy. What is more, the details read from the .xap file are presented. we should also upload some images, including the application icon and screenshots. Of course, we can use the same as previously chosen while preparing the game details in the Store Test Kit. It is important that the application details can be provided in many languages. The correct language version will be chosen automatically based on the currently set language on the user's phone.

To complete this step of submitting the project, click on the Save button. It navigates we to the page where we can review the provided information and either go back to edit it or submit it. When we select the second option, we have just finished submitting our first game to the store! Now, we should wait for the e-mail message with further information.

If we submit the beta application, we will receive information about its availability soon, together with an address to the website where we can download the game. Then, we can open it on the mobile device, install, and try it! Of course, other beta testers can test our project in the same way.

Regarding the public release, a process of certification can take significantly more time, but we will receive information when it is completed or some errors occur.

Updating submission

While the game is being used, we may like to fix some bugs as well as introduce new features. However, we may not want to create a new separate application in the Windows Phone Store, but just replace the current one. Thus, the users can easily update it.

A process of updating the submission also uses the Windows Phone Dev Center. Here, we need to click on the Apps option on the left, which opens the page with the data of our applications. After choosing a suitable one for editing, we can click on the Update app hyperlink. Here, we choose the Upload and describe wer XAP(s) option and click on the Replace link located next to the information about the previously uploaded .xap file. When the new version is sent, we can update the version number and some additional details, as well. At the end, we just click on the Save button, confirm modifications, and submit the form.


In this article, we learned how to configure Windows Phone 8 applications and games, as well as how to test them and submit to the store. Thus, they can be available to people from many countries all over the world. The first part of the article was related to the configuration using the manifest file. We learned what basic information can be provided, as well as how to prepare tiles. Next, we allowed the users to rate our project after clicking on the button in the Web screen. Then, we created the release version of the .xap file.

In the following section, we got to know how to test the application or game using tools integrated with the IDE. we used the Store Test Kit, Simulation Dashboard, Windows Phone Application Analysis, as well as frame rate counters. They are equipped with a set of features making testing easier and can be used to improve the software quality. It is worth mentioning that these modules allow we to test not only the basic configuration of the project, but also its performance and behavior in the real-world conditions.

In the last part of the article we learned how to publish our project in the Windows Phone Store. we got to know how the submission process is organized, as well as how to restrict access to our submission only to beta testers. Thus, our game can be tested by a limited set of users. After the testing period, we can resubmit the application and make it available in the public store.

Resources for Article :

Further resources on this subject:

Windows Phone 8 Game Development A practical guide to creating games for the Windows Phone 8 platform with this book and ebook
Published: September 2013
eBook Price: $29.99
Book Price: $49.99
See more
Select your format and quantity:

About the Author :

Marcin Jamro

Marcin Jamro is the developer and architect of various kinds of applications, such as web, mobile, and distributed ones. He is interested in many aspects of computer science, including software engineering and project management. Marcin is passionate about C#, C++, and C languages, design patterns, various technologies, and mobile devices, especially the Windows Phone platform.

He has practical experience in project development and holds the position of Chief Executive Officer at JAMROTECH Sp. z o.o. [Ltd.] (Rzeszow, Poland) which consists of activities like IT projects development, consulting, as well as conducting training. He also works at Rzeszow University of Technology and is writing a PhD thesis regarding real-time software engineering.

Marcin has published several papers, taken part in many conferences and organized a few of them, as well as participated in two internships at Microsoft in Redmond (USA). He has Microsoft Certified Professional, Microsoft Certified Technology Specialist, and Microsoft Certified Professional Developer certificates. More information about Marcin is available at his website: You can easily contact him by sending an e-mail message to

Books From Packt

Cocos2d for iPhone 1 Game Development Cookbook
Cocos2d for iPhone 1 Game Development Cookbook

Unity 3.x Game Development Essentials
Unity 3.x Game Development Essentials

Monkey Game Development: Beginner's Guide
Monkey Game Development: Beginner's Guide

iPhone Applications Tune-Up
iPhone Applications Tune-Up

jQuery Game Development Essentials
jQuery Game Development Essentials

Windows Phone 7 Silverlight Cookbook
Windows Phone 7 Silverlight Cookbook

Windows Phone 7.5 Data Cookbook
Windows Phone 7.5 Data Cookbook

Windows Phone 7.5: Building Location-aware Applications
Windows Phone 7.5: Building Location-aware Applications

No votes yet

Post new comment

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software