Creating Xbox Instant Play optimized Streaming Install Packages

Xbox Instant Play (XIP) allows you to create more optimized install plans for users installing from optical media by simply running your title while the Xbox devkit profiles I/O accesses, and then creating an automatic installation plan that can prioritize the install of subsets of data from individual files, in the order your title is most likely to access them.

To build and test an Xbox Instant Play streaming install plan

  1. Create a packaged version of your title by creating a layout.xml file and using makepkg.exe to build it. Make sure you separate your various content types into different chunks and use Intelligent Delivery specifiers to identify localized content and per-device content that will be conditionally installed.
  2. Identify the golden path scenarios for users playing your title for the first time. This also includes identifying areas you don’t want users playing from disc to be able to access until your title is fully installed, as appropriate within your game design.
  3. Run your title through the path you want to support for users first playing your title. For example, the character creation screen and first set of missions. A good target is to profile an hour of gameplay. Note, if there are multiple paths a user can choose, repeat this process for each of those different paths as separate profiling sessions, which will all be passed to the optimize command of xiputil using the /trace: argument. Each of these sessions should target an hour, especially if they use divergent assets.
  4. Collect your profile traces.
      Xiputil collect tracename.pfm
    
  5. Copy the pfm file locally
      xbcp /x/system xd:\DevelopmentFiles\XipFiles\tracename.pfm c:\MyPath\tracename.pfm
    
  6. Optimize your trace into a XIP streaming plan (XSP) file
      Xiputil optimize /trace:c:\MyPath\tracename.pfm /out:c:\MyPath\plan.xsp
    
  7. Test your plan along with the ODD install simulation mode of xbapp install:
      xbapp install MyGamePackage_1.0.0.0_x64__8wekyb3d8bbwe /oddsim /plan:C:\MyPath\plan.xsp
    
  8. Optional: Collect another trace and analyze any faults, where your title had to access data directly from the ODD because the streaming plan had not copied it to the hard drive yet.
      Xiputil collect xip_trace.pfm
    
      xbcp /x/system xd:\DevelopmentFiles\XipFiles\tracename.pfm c:\MyPath\xip_trace.pfm
    
      Xiputil interpret /trace:c:\MyPath\xip_trace.pfm /toc:"MyGamePackage_1.0.0.0_x64__8wekyb3d8bbwe.toc.xml" /out:c:\MyPath\analysis_time.txt /format:time
    

    Faults are indicated by “M,” markings in the time analysis file. Note: Xiputil offers several modes to analyze I/O accesses, and filter by regular reads or just faults. See the Xiputil docs for more information.

  9. Optional: Include data from both the first profiling run and the second profiling run into a single plan:
      Xiputil optimize /trace:c:\MyPath\tracename.pfm /trace:xip_trace.pfm /out:c:\MyPath\MultiTracePlan.xsp
    

Also, see: Xbox Instant Play Utility (XIPUtil.exe).

Future plans being investigated for XIP include:

Layout.xml package scheme additions

  1. Allowing entire files to be pinned as part of the pre-launch copy process. This is useful so that your title training doesn’t have to completely cover certain areas, for example menu assets which should always be included as part of the initial install prior to your title being launchable.
  2. Allowing files to be marked so that they are accessed from the ODD on demand and only installed after all other content has been installed. This is suggested for cutscenes or other random and sparsely accessed resources which are latency tolerant, such as randomly accessed commentary audio.

Runtime APIs for XIP mode

  1. Allowing a title to query whether it is running in XIP mode, where streaming install is driven by a XIP plan file, and accesses to content which isn’t yet installed may result in ODD servicing of reads.
  2. Allowing a title to query whether a given Chunk (and all files included in it) is entirely resident on the HDD, or queued for install.