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 status | New version file status | TapTap behavior | Notes |
|---|---|---|---|
| ❌ Does not exist | ✅ Exists | Download new file | |
| ✅ Exists | ❌ Does not exist | Delete file | Old file content is not checked (deleted even if modified at runtime) |
| ✅ Exists | ✅ Exists, same content | Ignore | Old file content is not checked (ignored even if modified at runtime) |
| ✅ Exists | ✅ Exists, different content | Download diff blocks only | Old file content is not checked; ensure the old-version file is not rewritten at runtime |
| ❌ Does not exist | ❌ Does not exist | Keep file | Files 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 status | New version dir status | TapTap behavior | Notes |
|---|---|---|---|
| ❌ Does not exist | ✅ Exists | Create empty directory | Before install/update, TapTap creates the entire directory tree per the new structure |
| ✅ Exists | ❌ Does not exist | Recursively delete the whole directory | Anything written into it at runtime (logs, caches, user data, etc.) is also deleted |
| ✅ Exists | ✅ Exists | Keep | The directory itself is untouched; files inside follow the File rules above |
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
- Keep the path and filename unchanged for the same file.
- Do not embed version-number information in the directory structure.
- Old-version files must not be rewritten at runtime.
- Precisely manage resource changes via version control, and keep temporary files out of the package.