Creating a new Windows Phone Game (4.0) project in Visual Studio creates bare minimum of what a game should be. However, two things remain to be set in order to make it look and feel like a proper game.
Fullscreen
Using the template created by Visual Studio, your game does not run in fullscreen mode. Battery status and current time are still visible and there is a black border surrounding the application area.
The resolution is still 800×480 (in landscape mode). To make the game run in fullscreen mode, simply add the following line after creating the GraphicsDevice:
graphics.IsFullScreen = true;
The game should look like this now:

Prevent screen lock
Although screen locking saves battery life, you do not want to lock the screen while user is playing simply because he starred at the game screen for some amount of time (maybe he was reading instructions). To prevent it, use the IsScreenSaverEnabled property of the Guide class. Set it to false to prevent screen lock.
Last updated by at .
Back to top