User Tools

Site Tools



This article describes preferred conventions for packaging resources for doomsday_2.0.

How ZIP files are treated

The engine does not differentiate between regular directories and the contents of ZIP files. In the internal_file_system, ZIP files appear as directories. Their contents can be modified as if they were regular directories/files. This applies to creating/deleting files/subdirectories, and reading/writing files.

ZIP files with the file name extension .zip, .pk3, .pack, .addon, .box, .demo, .savegame, and .map are all treated as ZIP files in the file system — their contents can be accessed just like they were regular directories.

Nesting ZIPs

A ZIP file can contain any number of nested ZIP files. They are treated just like every other ZIP file. Note that when accessing a nested ZIP file inside another ZIP file, a copy of the entire nested ZIP file is kept in memory. (Contents of unnested ZIP files are only kept in memory when caching individual decompressed entries.)

Note that the two cases below are identical from the engine's point of view:

  1. ZIP containing nested ZIPs:
    • (ZIP)
      • sub1.pack (ZIP)
        • subsub.pack (ZIP)
      • demonstration.demo (ZIP)
  2. ZIP containing unzipped subdirectories:
    • (ZIP)
      • sub1.pack/ (directory)
        • subsub.pack/ (directory)
      • demonstration.demo/ (directory)

For performance/memory consumption reasons, one might want to only use an actual ZIP file at the top level.

Resource packaging conventions

fs/packaging_resources.txt · Last modified: 2009-08-14 12:56 (external edit)