Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Sharing Your Game Package

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 RequirementsZune User Requirements
Windows, Xbox 360 and ZuneNo.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.
  • Must have XNA Game Studio installed.

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.

Games packaged in this format can be shared with XNA Creators Club members through the XNA Creators Club Web site for peer review and possible listing on the Xbox LIVE Marketplace.

Bb464158.note(en-US,XNAGameStudio.30).gifNote
Currently, only Xbox 360 games can be shared through XNA Creators Club.

There are two fundamental ways that a game package can be used:

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.

    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, click Microsoft XNA Game Studio 3.0, click Tools, and then click 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] [/nologo] [/output:file] [/quiet] [/thumbnailfile]

    The command-line parameters are:

    ParameterUsage
    assembly The startup assembly of your project. This is the .exe built by your XNA Game Studio project.
    [platform] Deprecated and optional. Specifies the platform for which the project is built. This value can be "Windows," "Xbox360," or "Zune" and must match your game's project type.
    [/nologo]Suppresses logo/copyright messages.
    [/output:file] Specifies 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]

    Specifies the 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.

    For a Zune game, the thumbnail appears in the Games list.

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

    xnapack MyWinGame.exe /nologo

    The Command-line window indicates the current status of the packing operation. If the packing operation is successful, you created the package file, and it is in the same folder as the startup assembly, with a .ccgame extension.

After you 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 receive 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 with which the .ccgame file was built.
    • For an Xbox 360 project, you must already have at least one Xbox 360 console specified in XNA Game Studio Device Center, you must have a valid XNA Creators Club membership, and you must have XNA Game Studio Connect running on the Xbox 360 console to which you are deploying the assets and game assembly.
    • For a Zune project, you must have at least one Zune digital media device specified in XNA Game Studio Device Center.

To unpack a packaged game from Windows Explorer

  1. From Windows Explorer, double-click the .ccgame file you want to unpack.

    A dialog box appears.

  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.
    • For a Zune project, when the unpacking is complete, you can run the game from the Games list.
Bb464158.caution(en-US,XNAGameStudio.30).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 Xbox 360, Zune, 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, click Microsoft XNA Game Studio 3.0, click Tools, and then click 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 [/listplatforms] [/listtargets] [/nologo] [/platform:name] [/quiet] [/run] [/showui] [/target:name]

    The command-line parameters are:

    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 3.0 for information about adding registered consoles to your computer.

    If the game is intended for the Zune digital media device, see Connecting to Your Zune Device with XNA Game Studio for information about adding registered devices to your computer.

    [/listplatforms]Lists the platforms that support the XNA Creators Club game package.
    [/listtargets]Lists the platform instances for a given platform. Must be used with /platform option.
    [/nologo]Suppresses logo/copyright messages.
    [/platform:name]Specifies the platform to which the game package is being deployed. Required if the package supports more than one platform and the target cannot be resolved.
    [/quiet] Suppresses all non-error messages.
    [/run]Runs the game once installation is complete. Applies only to Xbox 360 and Zune games.
    [/showui]Displays the user interface for confirming and copying files.
    [/target:name]

    Specifies the named platform instance to which the game package is being deployed. If no platform instance is specified, the default target is used. For a list of available targets, use the /listtargets option.

    Bb464158.note(en-US,XNAGameStudio.30).gifNote
    This option replaces the obsolete option /console.

    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.
    • For a Zune project, when the unpacking is complete, you can run the game from the Games list on your Zune device.
Bb464158.caution(en-US,XNAGameStudio.30).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 Xbox 360, Zune, and Windows platforms.

Community Additions

ADD
Show:
© 2015 Microsoft