Describes how XNA Game Studio includes a set of project templates that will help you to develop
game projects for Zune using the XNA Framework.
Starting a New Project
To start a new project
-
To begin a new Zune project, click File, and then click New
Project.
You’ll be presented with a dialog that lists a number of project templates.
Project Types
XNA Game Studio provides template types for XNA Framework game development in the
XNA Game Studio 3.1
section of the Visual C# project types. The templates offered for
developing XNA Framework games for Zune are:
- Zune Game (3.1)—A project for creating an XNA Framework 3.1 game application for Zune.
- Zune Game Library (3.1)—A project for creating an XNA Framework
3.1 game library for Zune.
- Content Pipeline Extension Library (3.1)—A project for creating
an XNA Framework 3.1 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.
Note |
|---|
| XNA Game Studio 3.1 continues to support creation and use
of XNA Game Studio 3.0 projects. If you'd like to create a new XNA Game Studio 3.0 project, click the XNA
Game Studio 3.0 category in the Project Types box to gain access to the
3.0 project types. For more information, see Upgrading XNA Game Studio Projects. |
Zune Game (3.1)
XNA Game Studio provides an Zune Game template that creates and loads a set of starter files. This
new project contains basic code that renders a colored background.
Results
The new starter project contains the following important features.
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 game 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 Zune Game
project:
- Microsoft.Xna.Framework
- Microsoft.Xna.Framework.Game
- 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 for the game. For more
information, see Game Content Project.
Game1.cs File
This file is a good starting point for adding simple game logic and basic features.
It implements a single class (derived from Game and called
Game1), and it overrides five methods: LoadContent,
UnloadContent, Initialize, Draw, and
Update. In addition, the Game1 constructor is defined by
this file. Use these methods to initialize your game components, load and render your
game content, and handle any input from the user or changes to the game
environment.
GameThumbnail.png
The icon appears in the Games Library, and when this game is packed for distribution
as a .ccgame. For more information about distribution, see Sharing Your Game Package.
Program.cs File
This file also implements a single class (called Program) that provides an
entry point to game execution. Usually, little code is added to this file unless the
game is fairly advanced.
To create an Zune Game (3.1) project
-
From the File menu, click New Project.
-
Select the Zune Game (3.1) project type.
-
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.
-
Click OK to create and load the new project.
Zune Game Library (3.1)
XNA Game Studio provides an Zune Game Library (3.1) 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 Zune 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 Zune
Game projects or Zune Game libraries.
Results
The new starter project contains the following important features.
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 Zune Game
Library project:
- Microsoft.Xna.Framework
- Microsoft.Xna.Framework.Game
- 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 an Zune Game Library (3.1) project
-
From the File menu, click New Project.
-
Select the Zune Game Library (3.1) project type.
-
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.
-
Click OK to create and load the new project.
Developing Xbox 360 Games
Creating a Windows Game or Library Project
Sharing Your Game Package