Export (0) Print
Expand All

Sharing Your Game Package

Presents information about how to distribute your game to other XNA Game Studio users in a package that protects your source code and assets.

Quick Information

PlatformSource Code VisibleFormatWindows User RequirementsXbox 360 User Requirements
Windows and Xbox 360No.ccgame XNA Creators Club Game Package
  • Must have XNA Game Studio installed.
  • Must have XNA Game Studio installed.
  • Must have an active membership in the XNA Creators Club.

If you would like to share your XNA Game Studio game with other XNA Game Studio users, but do not want to share your source code and assets, you can use the XNA Game Studio Package Utility (xnapack.exe). The Package Utility can be used from within supported versions of Microsoft Visual Studio tools, or from the command line.

Sharing with Another User

The XNA Game Studio Package Utility compresses your game's built executable and assets into a special compressed format that other XNA Game Studio users can open and play. You may package only XNA Game Studio game projects; the Package Utility does not support XNA Game Studio library projects.

To Package Your Game Using the XNA Game Studio Package Utility from the Visual Studio development environment

  1. In XNA Game Studio, open the project you want to package.
  2. On the Build menu, click Package [projname] as XNA Creators Club Game, where [projname] is the name of the current project.
  3. The Output window indicates the status of the packing operation. If the packing operation is successful, the package file will be created with a .ccgame extension and placed in the appropriate output folder of the project.

    For example, the package file for the release version of your Windows game would be located in the bin\x86\Release folder. This example assumes that the default project settings have not been modified.

You may share this .ccgame file with other XNA Game Studio users. It is a compressed version of your project that contains no source code or source assets. Other users can play it, but they will not be able to view or modify your source files.

To Package Your Game Using the XNA Game Studio Package Utility from the Command Line

  1. Open an XNA Game Studio command line by opening the Start menu and clicking Microsoft XNA Game Studio 2.0, then clicking Tools, and finally clicking XNA Game Studio Command Prompt.
  2. From the command line, use the cd command to change the active folder to the appropriate output folder of the project you want to package.
  3. Enter a packing command using the following syntax:

    xnapack assembly platform [options]

    The command-line parameters are as follows:

    ParameterUsage
    assembly The startup assembly of your project. This is the .exe built by your XNA Game Studio project.
    platform The platform the project is built for. This value can be "Windows" or "Xbox360", and must match your game's project type.
    [options]

    Four optional switches:

    • /nologo – Suppress logo/copyright messages.
    • /output:file – The path and file name of the output file. By default, your game is created in the same folder as the startup assembly with the same name. (Short form: /o:)
    • /quiet – Suppresses all non-error messages.
    • /thumbnail:file – Path to an optional thumbnail that is displayed with your game. (Short form: /th:)

      For a Windows game, this thumbnail appears in the graphical unpacking utility. For an Xbox 360 game, the thumbnail also appears in the My Games screen, located in the Games Library list.

    The following example packs a Windows game called MyWinGame and suppresses the logo/copyright messages.

    xnapack MyWinGame.exe Windows /nologo
  4. The Command-line window indicates the current status of the packing operation. If the packing operation is successful, the package file is created, in the same folder as the startup assembly, with a .ccgame extension.

After you have packed a game, you may share the .ccgame file with other XNA Game Studio users. It is a compressed version of your project that contains no source code or source assets. Other users can play it, but they will not be able to view or modify your source files.

Sharing from Another User

When you have received a .ccgame file from another XNA Game Studio user, you can unpack it using either the graphical unpacking utility or the command-line utility.

Consider the following before unpacking.

  • You must have XNA Game Studio installed.
  • Unpacking a .ccgame file automatically deploys the assets and game assembly to the target platform.

    • For a Windows project, you must have the same version of the XNA Framework installed that the .ccgame file was built with.
    • For an Xbox 360 project, you must already have at least one Xbox 360 console specified in XNA Game Studio Device Center, a valid XNA Creators Club membership, and XNA Game Studio Connect must be running on the Xbox 360 console being deployed to.

To Unpack a Packaged Game from Windows Explorer

  1. From Windows Explorer, double-click the .ccgame file you want to unpack. A dialog box will appear.
  2. Click Unpack to begin the unpacking process.
  3. When the unpacking process is complete, the next step depends on the platform.

    • For a Windows project, when the unpacking is complete, a folder containing the game executable opens in Windows Explorer. Run the game by double-clicking the executable.
    • For an Xbox 360 project, when the unpacking is complete, you can run the game from the My Games screen, located in the Games Library list.
Bb464158.caution(en-US,XNAGameStudio.20).gifCaution
If the intended destination of an unpacked game already exists, the XNA Game Studio Package Utility deletes the existing destination and its contents. It then creates a new container or folder containing the contents of the new game package. This applies to games targeting both Xbox 360 and Windows platforms.

To Unpack a Packaged Game from the Command Line

  1. Open an XNA Game Studio command prompt by opening the Start menu and clicking Microsoft XNA Game Studio 2.0, then clicking Tools, and finally clicking XNA Game Studio Command Prompt.
  2. From the command line, use the cd command to change the active folder to the folder containing the appropriate package.
  3. Enter an unpacking command using the following syntax.

    xnapack unpack package [options]

    The command-line parameters are as follows:

    ParameterUsage
    package An XNA Framework game package, previously created with the XNA Game Studio Package Utility. If the game is intended for the Xbox 360 console, see Connecting to Your Xbox 360 Console with XNA Game Studio 2.0 for information about adding registered consoles to your computer.
    [options]

    Five optional switches:

    • /console:name – If unpacking an Xbox 360 game, specifies the console being deployed to. If no console is specified, the default console is used. (Short form: /c:)
    • /nologo – Suppress logo/copyright messages.
    • /quiet – Suppresses all non-error messages.
    • /run – Run the game once installation is complete. Applies only to Xbox 360 games.
    • /showui – Displays the user interface for confirming and copying files

    The following example unpacks an XNA Creators Club game package containing a Windows game called MyWinGame and suppresses all non-error messages.

    xnapack unpack MyWinGame-Windows.ccgame /quiet
  4. When the unpacking process is complete, the next step depends on the platform.

    • For a Windows project, when the unpacking is complete, a folder containing the game executable opens in Windows Explorer. Run the game by double-clicking the executable.
    • For an Xbox 360 project, when the unpacking is complete, you can run the game from the My Games screen (located in the Games Library list) on your Xbox 360 console.
Bb464158.caution(en-US,XNAGameStudio.20).gifCaution
If the intended destination of an unpacked game already exists, the XNA Game Studio Package Utility deletes the existing destination and its contents. It then creates a new container or folder containing the contents of the new game package. This applies to games targeting both Xbox 360 and Windows platforms.

Community Additions

ADD
Show:
© 2014 Microsoft