Windows Phone 7 Series Programming with C#, XNA and Visual Studio 2010 Express

Microsoft have recently released their developement environment for Windows Phone 7 Series. It’s built on Visual Studio 10 and includes XNA studio 4.0 which can also be used on WP7S. It is available here

I installed the software on  my machine and had a quick play and I’m quite impressed with the results.

Installation screen

The application took quite a long time to install, although it included quite a lot of extras on top of Visual Studio – i.e. XNA 4.0, Silverlight and the emulation software.

Visual Studio 2010 splash screen.

Visual Studio 2010 welcome screen.

Code samples available for WP7S.

Create new C# project for WP7S dialog box.

Create new XNA project dialog box – now includes WP7S Game and Library options.

This is how a blank C# application runs in the emulator. The three buttons are clickable and there are also options to rotate the phone to see it in landscape or portrait.

The phone has been set to landscape.

The emulator also includes an installation of Internet Explorer mobile. This is available if you click the Windows button while any application is running.

This is the BBC News homepage loaded on the mobile Internet Explorer on the WP7S handset emulator.

Here is the tab view window – BBC News, Amazon and Bing are all displayed here as tabs or currently open web pages.

Microsoft have been saying over and over again how easy it will be to port games over to WP7S if they are already written in C# for windows or Xbox360. It’s already fairly painless to port a game from Windows to Xbox360 if this is the case, and Microsoft seem to have delivered in this aspect on WP7S too.

I decided to try a game on the phone, so loaded up a VS2008 XNA project which is simply a screensaver type screen where there are balls colliding with each other and the sides of the screen. This is by no means a good or well polished demonstration of XNA, C# or my programming skills but it was the simplest thing I could find to try on WP7S in a hurry.

So I loaded up my project in VS2008 and copied my resource for the ball texture into a new XNA game in VS2010. I then copied my code from the original application’s Load, Update and Draw methods into the WP7S game and hit the debug button. To my amazement it all just worked. I literally had to do no adjustment to any of the code, it was a straight copy and paste job.

The game running over the Visual Studio window.

The game running on the WP7S device.

I’ve only had a brief look at the Windows Phone 7 Series developement environment, but so far it has been very impressive. The ease of porting an application from Windows to WP7S is quite amazing, and I’m looking forward to seeing how some of my other XNA projects work out with it.

If you are interested or want to try it yourself, the two projects I made are here but be warned, they are very rough around the edges.



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: