Export (0) Print
Expand All
1 out of 3 rated this helpful - Rate this topic

Creating a Windows Phone Game or Library Project

XNA Game Studio 4.0
Describes how XNA Game Studio includes a set of project templates that will help you to develop game projects for Windows Phone using the XNA Framework.
Ff434569.note(en-us,XNAGameStudio.40).gifNote

The Windows Phone project templates for XNA Game Studio 4.0 are available only after the Microsoft Windows Phone Developer Tools has been installed.

Starting a New Project

To start a new project

  • To begin a new Windows Phone project, click File, and then click New Project.

    You’ll be presented with a dialog that lists a number of project templates.

Ff434569.UsingXNA_NewProjectDialog40_Mobile(en-us,XNAGameStudio.40).png

XNA Game Studio provides template types for XNA Framework game development in the XNA Game Studio 4.0 section of the Visual C# project types. The templates offered for developing XNA Framework games for Windows Phone are:

  • Windows Phone Game (4.0)—A project for creating an XNA Framework 4.0 game application for Windows Phone.
  • Windows Phone Game Library (4.0)—A project for creating an XNA Framework 4.0 game library for Windows Phone.
  • Content Pipeline Extension Library (4.0)—A project for creating an XNA Framework 4.0 Content Pipeline Extension Library. For more information, see Creating a Windows Game or Library Project.

For information about XNA Game Studio project templates for Windows or Xbox 360, see Creating a Windows Game or Library Project and Creating an Xbox 360 Game or Library Project.

Windows Phone Game (4.0)

XNA Game Studio provides a Windows Phone Game template that creates and loads a set of starter files. This new project contains basic code that renders a colored background.

To create a Windows Phone Game (4.0) project

  1. From the File menu, click New Project.

  2. Select the Windows Phone Game (4.0) project type.

  3. Type the name for the game project in the Name text box.

    You can also modify the default values for the Location and Solution Name controls.

  4. Click OK to create and load the new project.

Results

The new starter project contains the following important features.

Ff434569.UsingXNA_SolutionExplorer_Mobile_GameSolution(en-us,XNAGameStudio.40).png

References

References to the following assemblies are added automatically to a new Windows Phone Game project:

  • Microsoft.Xna.Framework
  • Microsoft.Xna.Framework.Game
  • Microsoft.Xna.Framework.GamerServices
  • Microsoft.Xna.Framework.Graphics
  • mscorlib
  • System
  • System.Core
  • System.Xml
  • System.Xml.Linq

In addition to these standard assemblies, you can add other assemblies as needed for your project.

Windows Phone Game Library (4.0)

XNA Game Studio provides a Windows Phone Game Library (4.0) template that creates and loads a set of starter files. Typically, projects of this type contain managed classes that implement basic or advanced features used by a game engine. Once completed, these class libraries can be referenced by other Windows Phone projects. Also, they provide common functionality without having that code reside within the game project.

The new project contains basic code that implements an empty library, usable by other Windows Phone Game projects or Windows Phone Game libraries.

Results

The new starter project contains the following important features.

Ff434569.UsingXNA_SolutionExplorer_Mobile_Library(en-us,XNAGameStudio.40).png

Project Properties

These properties control many aspects of your current project. Some examples include general application settings, debug settings, and additional project resources. You can use the Project Designer to modify the values for these properties.

In addition to these properties, assembly information (such as the library title) is stored in the AssemblyInfo.cs file. You can use the Assembly Information dialog box to modify this information, or you can manually edit the .cs file.

References

References to the following assemblies are added automatically to a new Windows Phone Game Library project:

  • Microsoft.Xna.Framework
  • Microsoft.Xna.Framework.Game
  • Microsoft.Xna.Framework.GamerServices
  • Microsoft.Xna.Framework.Graphics
  • mscorlib
  • System
  • System.Core
  • System.Xml
  • System.Xml.Linq

In addition to these standard assemblies, you can add other assemblies as needed for your project.

Content

The nested Content project stores and builds content that is to be included in the game library. This is useful for including reusable content assets that support the classes and methods in the game library. For more information, see Game Content Project.

Class1.cs File

This file implements an empty C# class within a namespace. It provides a starting point for the class library.

To create a Windows Phone Game Library (4.0) project

  1. From the File menu, click New Project.

  2. Select the Windows Phone Game Library (4.0) project type.

  3. Type the name for the library project in the Name text box.

    You can also modify the default values for the Location and Solution Name controls.

  4. Click OK to create and load the new project.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.