Escape the fear of writing XNA games for Windows Phone 7.5 and XBOX 360

Sign in to queue


This week we're going to be doing a gaming theme, mostly focusing on getting started writing games (Pretty much in the hope that all of you that aren't already writing games, start doing so and thereby give us something to blog about here... see how that works? I'm tricksy hobbit/man/guy/what-ever...)

We kick off the week with a tutorial, from start to gaming, on writing an XNA Windows Phone 7.1(5) game. One of the main points I'd like to stress in this tutorial is that you don't have to be afraid of writing a game. It's not as scary or hard as you might think...

Tutorial: Creating a XNA 4.0 game for Windows Phone 7.5

In this tutorial we are going through the process of creating a simple game from A to Z using Visual Studio 2010 and the Windows Phone 7.1 SDK – Targeting Windows Phone 7.5.

This game was created during a presentation and took about 45 minutes, and patched as the session went on by feedback from the audience. I just documented the process and shared it on this blog.

First of all, if you haven’t done so yet – you will need to download the Windows Phone SDK.


1. Designing the game

The first thing you should do when creating a game is to come up with an idea, story and how you should go through that story. It’s important to be able to explain the game in one sentence – if you can’t, the players/gamers/consumers will have trouble understanding the game. If you can, it will be much easier to market and sell the game!


2. Creating the graphics

Most games require some graphics. In this game I want to have a playfield that represents the floor in a ghost house, a ghost, a player, some text that display high scores and some dot’s that show where I just walked (path).


3. Game logic

Next we should think how we should play the game, what’s the logic, how is the enemies moving, how should the player move and so on.


4. Implementing the game


The games classes we will implement

Be sure do download the source for the applications so you can follow the implementations. Or you can follow the steps below and create the game as we go, but not all details will be covered.


At this point the post takes you through the development process and explaining the major code points.



As an added bonus, not only is the source for this game available (click through for the download links), but the author has also already ported it to the XBOX 360 (and made that source available too!)

Xbox 360 game with source: Escape

I just quickly ported the game Escape (created in this tutorial) to Xbox 360. The code is quite similar with two exceptions:

- I had to handle the safe limit zone and various screen resolutions
- I changed the controller from being touch-based to GamePad-based, and also considering that the player might use a gamepad that is either player one, two, three of four.

I also removed the online high score system since when it comes to the Xbox 360, we have to use a completely different approach when it comes to online storage.


If you already know C# and are thinking about writing XNA games for Windows Phone 7 or the XBOX 360, this tutorial would be a great place to start...

The Discussion

  • User profile image

    Hmmm.... I thought the 'fear' of writing XNA games come from the lacking of support for XNA in future platforms .......

  • User profile image

    With great pleasure we would like to write the conversion of our games for the Xbox, but unfortunately, Microsoft forbids developers from Poland to write games for Xbox...! Crying

  • User profile image

    @felix9: There are appropriate libraries that allow you totame the fear of moving games to other platforms. I recommend MonoGame ..

  • User profile image

    Here is list of XNA supported markets from

    10 countries for Xbox and 65 for Windows Phone! Scared


    Can play in these countries:

    • United States
    • United Kingdom
    • Canada
    • France
    • Italy
    • Germany
    • Japan
    • Sweden
    • Singapore
    • Spain

    PHONE Here's the list of markets where you can sell your application:

    • Argentina
    • Australia
    • Austria
    • Bahrain
    • Belgium
    • Brazil
    • Bulgaria
    • Canada
    • Chile
    • China
    • Colombia
    • Costa Rica
    • Croatia
    • Czech Republic
    • Denmark
    • Estonia
    • Finland
    • France
    • Germany
    • Greece
    • Hong Kong
    • Hungary
    • Iceland
    • India
    • Indonesia
    • Iraq
    • Ireland
    • Israel
    • Italy
    • Japan
    • Kazakhstan
    • Latvia
    • Lithuania
    • Luxembourg
    • Malaysia
    • Mexico
    • Netherlands
    • New Zealand
    • Norway
    • Peru
    • Philippines
    • Poland
    • Portugal
    • Qatar
    • Romania
    • Russia
    • Saudi Arabia
    • Serbia
    • Singapore
    • Slovakia
    • Slovenia
    • South Africa
    • South Korea
    • Spain
    • Sweden
    • Switzerland
    • Taiwan
    • Thailand
    • Turkey
    • Ukraine
    • United Arab Emirates
    • United Kingdom
    • United States
    • Venezuela
    • Vietnam

Add Your 2 Cents