Trial mode in XNA Game Studio 3.0

Originally posted to Shawn Hargreaves Blog on MSDN, Wednesday, September 17, 2008

All Xbox LIVE Community Games are required to provide a trial mode, so people can play the game for a while before deciding if they want to purchase it. You have several choices as to how much time you want to spend implementing this.

 

Do Nothing

You can do no work at all, and your game will still have a good trial mode experience. Here's what the framework does for you:

Note that networking is not supported in trial mode. If you try to create or join a network session while in trial mode, you will get a GamerPrivilegeException. But you don't need to write any special code to handle this, because trial mode forces GamerPrivileges.AllowOnlineSessions to false, just the same as if it was a Silver or child account.

 

Detecting Trial Mode

Some games want to detect when they are running in trial mode. You might change your level selection based on this, giving the trial an easy but exciting first level that will suck people in, and only enable the slower paced training missions after they purchase it.

Trial mode is easy to detect:

The value of IsTrialMode can change at any point. Even for a game that has been purchased, trial mode might be active for a few frames when it first starts up, as the system checks what user profiles are signed in to see whether they own it. And of course the user may purchase the full game while the trial version is running. So if you have a menu that displays different options depending on the trial status, you should update this every frame, not just once when the menu is first activated.

Once a game has been unlocked, it will never go back to being in trial mode. Even if the original user profile signs out, the game stays unlocked as long as it is running.

 

Upselling Your Game

You can use Guide.ShowMarketplace to display the purchase UI before our time limit has expired.

For instance a multiplayer networked game could deal with trial mode in several ways:

 

Testing Trial Mode

This trial mode stuff is all very well for Community games that have made it through peer review, but what about when you are testing or peer reviewing? At this point the game is not yet on Marketplace, so there is no way to purchase it. Even if there was, you wouldn't want to pay real money every time you tried to test something!

Fear not. You have several options:

Blog index   -   Back to my homepage