O'Reilly logo

3D Game Development with Microsoft Silverlight 3 Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action—saving configurations

Your project manager likes the possibility to use levels by configuring them using an easy to understand XML file. Now he wants you to find a way to let a player save his own desired skill level. The game must use this skill level. However, he does not want you to use a variable, he wants the values to persist in an isolated storage— without adding security risks for the player.

Now, we are going to add the possibility to save and retrieve configurations values to and from an isolated storage in a sandbox.

  1. Stay in the 3DInvadersSilverlight project.
  2. Open InvadersGame.cs.
  3. Add the following lines of code at the beginning (as we are going to use the IsolatedStorageSettings class):
    using System.IO.IsolatedStorage; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required