Life’s Little Coding Lessons
This is a little section where I will put the little tidbits I have discouvered during my development of more than a dozen Windows Phone apps!!!
Check back often as this page will be continually growing. This will be one of your favorite spots when Google just doesn’t seem in the mood to help you!
Liscensing and XNA Games on the Windows Phone
The trial model that Microsoft has come up with is fantastic!!! Take it from an ooooold mobile devloper, this is light years ahead of what we had to do “back in the day”.
That being said, there are some things that you really have to watch out for when setting your application, especially your XNA-based games up to take advantage of Microsoft’s trial goodness.
When instituting the trial check (which is really only two lines of code) to ascertain whether the version playing is a Trial or Full version of your game, you need to make sure that you do the following:
Set your self a class-level boolean variable such as: bool isTrial = False;
In the Initialize() method of your Game object, populate that variable with the state of the currently running version.
If you do this in the Update() or any other method, you will end up with inconsistent gameplay and the user experience will not be what you want it to be.