Creating an Xbox 360 Game or Library Project

Describes how XNA Game Studio includes a set of project templates that will help you to develop game projects for Xbox 360 using the XNA Framework.

Starting a New Project

To begin a new Xbox 360 project, click File, and then click New Project.

Bb199627.UsingXNA_NewProjectDialog_Xbox_3(en-US,XNAGameStudio.30).png

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

  • Xbox 360 Game (3.0) – A project for creating an XNA Framework 3.0 game application for Xbox 360.
  • Xbox 360 Game Library (3.0) – A project for creating an XNA Framework 3.0 game library for Xbox 360.
  • Content Pipeline Extension Library (3.0) – A project for creating an XNA Framework 3.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 Zune, see Creating a Windows Game or Library Project and Creating a Zune Game or Library Project.

Xbox 360 Game (3.0)

XNA Game Studio provides an Xbox 360 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.

Bb199627.UsingXNA_SolutionExplorer_Xbox_Game(en-US,XNAGameStudio.30).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 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 Microsoft.Xna.Framework and Microsoft.Xna.Framework.Game assemblies exist in the project as well as the mscorlib, System, System.Core and System.Xml.Linq assemblies. In addition to these standard assemblies, you can add other assemblies, depending on the project type.

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 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 displayed in the Games Library, and when this game is packed for distribution as a .ccgame. For more information on 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 Xbox 360 game (3.0) project

  1. From the File menu, click New Project.

  2. Select the Xbox 360 Game (3.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.

Xbox 360 Game Library (3.0)

XNA Game Studio provides an Xbox 360 Game Library (3.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 or 3D renderer. Once completed, these class libraries can be referenced by other Xbox 360 projects and 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 Xbox 360 Game projects or Xbox 360 Game libraries.

Results

The new starter project contains the following important features.

Bb199627.UsingXNA_SolutionExplorer_Xbox_Library(en-US,XNAGameStudio.30).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 modify the values for these properties using the Project Designer.

In addition to these properties, assembly information (such as the library title) is stored in the AssemblyInfo.cs file. This information can be modified using the Assembly Information dialog box or manually editing the .cs file.

References

References to the Microsoft.Xna.Framework and Microsoft.Xna.Framework.Game assemblies exist in the project as well as the mscorlib, System, System.Core and System.Xml.Linq assemblies. In addition to these standard assemblies, you can add other assemblies, depending on the project type.

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, providing a starting point for the class library.

To create an Xbox 360 Game Library (3.0) project

  1. From the File menu, click New Project.

  2. Select the Xbox 360 Game Library (3.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.

Show: