Export (0) Print
Expand All

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 start a new project

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

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

Bb199627.UsingXNA_NewProjectDialog40(en-us,XNAGameStudio.41).png

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

  • Xbox 360 Game (4.0)—A project for creating an XNA Framework 4.0 game application for Xbox 360.
  • Xbox 360 Game Library (4.0)—A project for creating an XNA Framework 4.0 game library for Xbox 360.
  • 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.

Xbox 360 Game (4.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.

To create an Xbox 360 game (4.0) project

  1. From the File menu, click New Project.

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

Bb199627.UsingXNA_SolutionExplorer_Xbox_Game(en-us,XNAGameStudio.41).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 following assemblies are added automatically to a new game project.

  • Microsoft.Xna.Framework
  • Microsoft.Xna.Framework.Avatar
  • Microsoft.Xna.Framework.Game
  • Microsoft.Xna.Framework.GamerServices
  • Microsoft.Xna.Framework.Graphics
  • Microsoft.Xna.Framework.Net
  • Microsoft.Xna.Framework.Storage
  • Microsoft.Xna.Framework.Video
  • Microsoft.Xna.Framework.Xact
  • mscorlib
  • System
  • System.Core
  • System.Net
  • System.Xml
  • System.Xml.Linq

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

Content References

The content references node specifies the content projects whose assets will be used by the game on this platform. For more information, see Game Content Project.

Game.ico File

A 32 × 32 default icon representing your game.

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. Use these methods to initialize your game components, to load and render your game content, and to handle any input from the user or changes to the game environment.

GameThumbnail.png

The icon appears in the Games Library, and when a 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.

Content Project

The content project occupies a parallel position with the game project in the solution, and it stores and builds art assets for the game. For more information, see Game Content Project.

Xbox 360 Game Library (4.0)

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

  • Microsoft.Xna.Framework
  • Microsoft.Xna.Framework.Avatar
  • Microsoft.Xna.Framework.Game
  • Microsoft.Xna.Framework.GamerServices
  • Microsoft.Xna.Framework.Graphics
  • Microsoft.Xna.Framework.Net
  • Microsoft.Xna.Framework.Storage
  • Microsoft.Xna.Framework.Video
  • Microsoft.Xna.Framework.Xact
  • mscorlib
  • System
  • System.Core
  • System.Net
  • 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 Xbox 360 Game Library (4.0) project

  1. From the File menu, click New Project.

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

Community Additions

ADD
Show:
© 2014 Microsoft