Creating LevelCache Files

Obsolete

As of CRYENGINE 3.6.7, we’re no longer building some cache files for packaged builds. The functionality to do so in the engine is still present, though it will likely be removed at a later date.

We anticipate this will not only improve performance on current platforms, it also simplifies the build process greatly and also removes some post-build issues, such as having to modify the startup.pak in order to remove the shipped sample levels which had file content inside.

The reason for this change is these cache files were built with 7th Generation consoles (Xbox 360 / Playstation 3) in mind and specifically, optical disk access performance. With the Xbox One and Playstation 4 requiring all apps be installed onto the hard disk, these cache files no longer offer performance benefits.

Among the files/folders affected are:

  • GameSDK/_FastLoad/startup.pak
  • GameSDK/_LevelCache/*.*
  • GameSDK/modes/*.*

Overview

Once created, auto_resourcelist files can be found inside level folders, pertinent to that level, and are used to create the content inside the _LevelCache folder.

These files are used during the build process to assemble pak files, segregated into types (listed below), which helps the engine with content streaming to speed up level loading.

List Creation

Creating a list is as simple as loading a level, but you also need to activate this CVar before doing so, from the main menu: sys_PakSaveLevelResourceList=1

This process should only be done in the Launcher, not via Sandbox.

The engine will then output two files, after the level has completed loading:

  • Game\Levels\<GameMode>\<LevelName>\auto_resourcelist.txt
  • Game\Levels\<GameMode>\<LevelName>\auto_resources_sequence.txt

The "sequence" version is the exact sequence which the Engine loaded each asset, rather than sorted by name. This file is provided for debugging purposes and is not required for the build process.

Build Process

In the RC folder (<root>\Bin32\RC\) you'll find a file called RCJob_PerLevelCache_SDK.xml.

This file is used during the build process to create pak files, specifically tailored to each individual level in the build. This is where the resource lists come in.

<Properties ListFile="${game}\Levels\Singleplayer\${Level}\auto_resourcelist.txt" />

With this information, the build process will then create pak files, for each level, based on different filetypes (as mentioned earlier):

  • cga.pak
  • cgf.pak
  • chr.pak
  • dds0.pak
  • skin.pak
  • xml.pak

These files are then placed inside the following folder structure: GameSDK\_LevelCache\<LevelName>\