Windows Phone Game Development Tips

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.


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.


About programabilan

Profesionalni programer, amaterski programer...

Posted on December 30, 2011, in Tips and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: