Trial mode in XNA Game Studio 3.0

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:

  • Users can play the game for a fixed period of time.

  • When the timer runs out, we will bring up a screen over the top of your game, saying "hey, this trial has expired: do you want to purchase the game?"

  • If they decide to purchase, the screen goes away and they can continue playing.

  • If they say no, we exit the game.

  • While the trial expiry screen is up, Game.IsActive will be false, the same as if any other Guide screen was active.

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:

  • Add a GamerServicesComponent to your game, if you don't have one already.

  • Check the value of Guide.IsTrialMode.

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:

  • It could hide the "Play Online" menu option when in trial mode.

  • It could leave this option in the menu, but have it display an error message.

  • The "Play Online" option could bring up a message that says "hey, you need to purchase this game before you can play it online. Do you want to do that now?" and then take the user to Marketplace.


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:

  • When launched from Visual Studio, Creator games are not in trial mode, so you get to see and test everything.

  • When launching a Creator game from the Xbox Dashboard Game Library, you will see options to start either in trial mode or as a full version. Peer reviewers can use this to make sure the game behaves sensibly in both modes.

  • If you set Guide.SimulateTrialMode to true in your Game constructor (important: for this to work you must set it before the first update!) this will force the game to run in trial mode, so you can debug trial-specific behaviors.

  • If you call Guide.ShowMarketplace from a Creators game that is not yet on Marketplace, this will not actually take you to Marketplace, but will instead bring up an emulation message box asking whether you want to simulate a purchase. Saying yes will change Guide.IsTrialMode to false, and enable network sessions, the same as if you had really purchased a Community game. Combined with the SimulateTrialMode setting and/or launching in trial mode from the Game Library, this allows you to test your upsell implementation.

Comments (12)

  1. Gulix says:

    I was wondering if the demo mode could be ignored when releasing a game. If it isn’t used, then, the complete game could be provided free of charge for players.

    Each player could then choose to pay or not for the game, with nothing else added.

    Is this approach authorized ?

  2. BenS1 says:

    My game is a multiplayer network game only… i.e. there is no single player option. Givne that network play is disabled in trial mode, how can I provide a trial?

  3. ShawnHargreaves says:

    > I was wondering if the demo mode could be ignored when releasing a game. If it isn’t used, then, the complete game could be provided free of charge for players.

    That is not currently an option. The basic trial mode experience is implemented by the system software, so you will get the timeout at the end of the trial period no matter what your game code does.

  4. ShawnHargreaves says:

    > My game is a multiplayer network game only… i.e. there is no single player option. Givne that network play is disabled in trial mode, how can I provide a trial?

    That’s a problem 🙂

    You can use system link networking in trial mode, but most customers probably don’t have a second Xbox to play with.

    You could create a local session just to let the player explore around the world, check out your graphics, etc, without any opponent players.

    Or you could just bring up a screen saying "sorry dude, this game doesn’t have any actual content in trial mode, so you’ll just have to trust me that you want to purchase it". Maybe show them some cool screenshots, list your gameplay features, etc?

    For a really polished experience, you could implement some kind of AI bot gameplay for trial mode. It wouldn’t have to be really competitive, since this would only be intended for a few minutes to give the player a feel for the game.

  5. BShields says:

    Or you could add split-screen multiplayer mode 🙂

  6. jasond says:

    Disabling network play in the trial means global P2P high scores are disabled. This hurts the chances of a sale. The player doesn’t see how cool it is that they are being ranked. No one will see their efforts. The high score lists will lack all the people who tested the game. The less scores there are, the less meaning they have.

    Is there any chance of removing this restriction?  I have a connect issue open:


  7. mechaghost says:

    Is there a way to attach a debugger and get into trial mode where the game will actually timeout due to the 8 minutes being over? because I have not been able to debug if launching from NXE.

    I need to debug because my game is crashing everytime time trial expires, but just setting Guide.SimulateTrialMode = true does not trigger the timeout from happening.

  8. ShawnHargreaves says:

    You can’t simulate the 8 min timeout with the debugger attached.

    Telepathic guess: I bet you’re setting some device state (maybe the vertex declaration?) in your init code, rather than every time you draw. If you have a Windows version of your game, try dragging it to a second monitor, or locking your desktop: I bet it’ll crash too if you do that.

  9. J tremblay says:

    I am wondering if someday we will be able to remove the 8 minute trial, it makes me really sad! Do you think in the 3.2 version or an upgrade can it be removed?

  10. James says:

    I have to agree, the forced 8 minute trial is really really horrible. What was the reason for not putting the "show purchase screen" in full control of the developer?

  11. Mike Sharpe says:

    I would like the option to handle the up-sell without been forced to use the default 8 min screen 🙂 I think its a great option for developers that dont want to worry about how to provide the demo mode.

    I've had an issue where Im handling the demo over and the screen has popped up over the top of mine, its very confusing to the player and Im forced to use it.

    Be great if it could be turned off.

  12. Tarsono says:

    So is The BEST

Skip to main content