How to: Implement a Trial Experience in an XNA Framework Application for Windows Phone
March 22, 2012
This topic describes how to implement a trial experience in your XNA Framework application. The goal of a trial experience is to give the user an opportunity to try your game before they commit to buying it. A trial experience typically limits the application, for example, by disabling features, by disabling levels in a game, or by setting a time limit on the usage of the application. These are just examples of the kind of limitations you can implement for your application. The limitation you choose for your application is entirely up to you. In this topic, a simple game will be created that has a level limit in trial mode. That is, some levels of the game are disabled when the application is running in trial mode. Determination of the mode in which the application is running is done using the Guide.IsTrialMode property. A completed version of this application is available as a download. For more information, see Trial Applications Sample (XNA Framework). For information about implementing a trial experience for a Silverlight application, see How to: Implement a Trial Experience in a Silverlight Application for Windows Phone..
To demonstrate a trial experience, this topic creates a game that has game logic, collision detection, multiple levels, and a scoreboard. The topic is broken down into a series of topics that describes the major components of this application. When you have completed this series, you will have an application that looks like the following image.
A square graphic object bounces around the screen. The objective of the game is to tap the square as it bounces around the screen. Each time the user taps the square, the score increases. The score for each round is five. After five is reached, the user proceeds to the next level. The user’s current score and current level are displayed on the scoreboard on the screen. There are three levels in the game. The speed of the square bouncing around the screen increases as the user proceeds to the next level. When the application is run in trial mode, the user can play only level one. You should work through each topic in the series in the order in which they are presented here. For a sample that demonstrates the functionality described in this topic, see Trial Applications Sample (XNA Framework).
To create the application described in this topic, complete the procedures in the following topics.