Assembly: Microsoft.Xna.Framework.GamerServices (in microsoft.xna.framework.gamerservices.dll)
Getting the value of IsTrialMode on Windows Phone is a synchronous (blocking) operation that can take 60ms or more to complete when your game is in trial mode.
To prevent significant delays in your game's framerate, don't place this call in your game's Draw or Update methods. It's best to check this property in the Game.OnActivated Method method when your game is initializing or returning from an interruption in gameplay.
|When a trial game is exiting, you can present a marketplace offer using the Guide.ShowMarketplace method. You can write code that is performed on game exit in the Game.Exit method.|
Limited Trial Mode
While in trial mode, games will be unable to use the Xbox LIVE servers to connect to other machines over the Internet for player match or ranked network sessions. Note that this does not affect system link sessions, which are always available.
The Guide.IsTrialMode property always returns true when a game begins. Guide.IsTrialMode may change to false shortly after game launch if a license is detected when a player signs in, or it could change at any time after game launch if a license is acquired.
App Hub games can be launched in simulated trial mode by setting the Guide.SimulateTrialMode property to true when the game starts. During development, when App Hub games are running on an Xbox 360 console, there is also an option in the dash to launch a game in simulated trial mode.
Indie games downloaded from the Xbox LIVE Marketplace will run in limited trial mode until one of the signed-in gamers acquires a license for the game. Detection of a game license could occur as part of game startup, in response to an in-game purchase, or as part of user signing in.
For Xbox LIVE Indie Games running in trial mode, gameplay will be limited to a short trial period. At the end of the gameplay period, the player will see an expiration screen. The player can then either exit the game via the B or Back button or use the X button to unlock the game. If the player chooses to unlock the game, a Marketplace screen will be displayed. The player can then buy the full version of the game.
While the expiration screen shows, Game.IsActive will return false, and all input to the game will be blocked. Rendering can continue. However, the expiration screen obscures most of the rendering process, and any controller vibration will be stopped.
|It is generally a good idea to pause the game when Game.IsActive is false.|
For App Hub games running in simulated trial mode there will be no time limitation applied to gameplay.