Skip to main content
Version: v4

Package Update Rules

This page is the reference part of TapTap PC Game Update Mechanism, describing how files and directories inside the package are handled when TapTap delivers an update. For when incremental vs. delta updates apply, see Incremental and Delta Updates.

When TapTap delivers an update, it compares the old and new packages and handles file and directory additions, deletions, and modifications according to the rules below. Following these rules helps generate smaller patches and avoid accidentally deleting runtime data.

File rules

Old version file statusNew version file statusTapTap behaviorNotes
❌ Does not exist✅ ExistsDownload new file
✅ Exists❌ Does not existDelete fileOld file content is not checked (deleted even if modified at runtime)
✅ Exists✅ Exists, same contentIgnoreOld file content is not checked (ignored even if modified at runtime)
✅ Exists✅ Exists, different contentDownload diff blocks onlyOld file content is not checked; ensure the old-version file is not rewritten at runtime
❌ Does not exist❌ Does not existKeep fileFiles generated at runtime are not deleted or modified

Directory rules

Directories in the package (including empty ones) are recorded together with the package. Directory differences between old and new versions are handled as follows:

Old version dir statusNew version dir statusTapTap behaviorNotes
❌ Does not exist✅ ExistsCreate empty directoryBefore install/update, TapTap creates the entire directory tree per the new structure
✅ Exists❌ Does not existRecursively delete the whole directoryAnything written into it at runtime (logs, caches, user data, etc.) is also deleted
✅ Exists✅ ExistsKeepThe directory itself is untouched; files inside follow the File rules above
caution

If a directory is removed in the new version, TapTap clears it entirely, and files written into it at runtime are deleted along with it. For directories involving user data / saves, place them in a dedicated directory outside the package from the start, to avoid accidental deletion when the directory structure changes in later versions.

Developer best practices

Saves and user data

  • Place game saves in a dedicated directory (e.g., Saves/) and exclude it when packaging.
  • Place player personalization settings (key bindings, graphics, language, etc.) in a dedicated directory (e.g., UserSettings/) and exclude it from the package.
  • Never put user data inside a directory already included in the package — if that directory is removed in a later version, the runtime data inside will be cleared along with it.

Package content

  • Read-only principle: Keep files inside the package read-only at runtime; never modify them dynamically.
  • Stable paths: Keep the same relative path and filename for the same resource across versions; keep the directory structure stable and avoid renaming or deleting directories wholesale between versions.
  • Remove redundant resources: Delete obsolete resource files to reduce patch size.

Getting the best incremental / delta results

  1. Keep the path and filename unchanged for the same file.
  2. Do not embed version-number information in the directory structure.
  3. Old-version files must not be rewritten at runtime.
  4. Precisely manage resource changes via version control, and keep temporary files out of the package.