Export (0) Print
Expand All

Sharing Your Game Package

Presents information about how to distribute your game to other XNA Game Studio Express 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 Express installed.
  • Must have XNA Game Studio Express installed.
  • Must have an active membership in the XNA Creators Club.

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

Sharing to Another User

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

To package your game using the XNA Game Studio Express Package utility [Visual C# Express]

  1. In XNA Game Studio Express, 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 in Visual C# Express will indicate 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 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 Express 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 Express Package utility from the command line

  1. Open an XNA Game Studio Express command line by opening the Start menu and clicking Microsoft XNA Game Studio Express, then Tools, and then XNA Game Studio Express 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 Express 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 of XNA Game Launcher.

    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 Express 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 Express 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 Express 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 an active Xbox 360 console specified in the Options dialog box of XNA Game Studio Express, a valid XNA Creators Club membership, and XNA Game Launcher must be running on your active Xbox 360 console at the Connect to Computer screen.

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 the Unpack button 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, the game can be run from the My Games screen of XNA Game Launcher.
Bb464158.caution(en-US,XNAGameStudio.10).gifCaution
If the intended destination of an unpacked game already exists, the XNA Game Studio Express 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 Express command prompt by opening the Start menu and clicking the Microsoft XNA Game Studio Express, then Tools, and then XNA Game Studio Express 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 Express Package utility. If the game is intended for the Xbox 360 console, see XNA Game Studio Express Xbox 360 Options Page for information about adding registered consoles to your computer.
    [options]

    Five optional switches:

    • /console:name – If unpacking an Xbox 360 game, the console being deployed to. If no console is specified, the current active 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, the game can be run from the My Games screen of the XNA Game Launcher.
Bb464158.caution(en-US,XNAGameStudio.10).gifCaution
If the intended destination of an unpacked game already exists, the XNA Game Studio Express 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.
Show:
© 2014 Microsoft