/Documentation/Patch Runtime/The Patching Lifecycle

The Patching Lifecycle

The engine executes in a strict linear sequence. Understanding these stages helps in debugging and configuration.

1. Initialization & Security

  • Self-Update: The patcher checks our servers for a newer runtime version of itself and updates itself immediately if found.

  • Directory Detection: Locates the game installation folder based on Registry keys or relative paths. You can define this in your Patch Settings.

2. Splash

  • Displays a borderless Splash Screen while the main engine loads.

  • Configurable duration, dimensions, and image URL via your Splash Settings.

3. Background & UI Setup

  • Initializes the main window.

  • Applies custom fonts, colors, and background images defined in your project settings.

4. Prerequisites (Pre-Patch)

  • Checks for required dependencies before patching starts (e.g., .NET Framework 4.5+).

  • Can execute local files, open URLs, or check registry keys.

5. The Patching Engine

  • Server Selection: Auto-selects or prompts user if multiple mirrors exist. Prompt won’t show if no more than one server available. Prompt won’t show if -server command line argument is sent.

  • Differential Scan: Compares local files against the server manifest using size, modification time, and a salted hash.

  • Download: Supports parallel downloads and resumable transfers (in case of crash or other problem). Also supports auto-switching between multiple servers, if available.

  • Staging: Downloads to a staging/ folder first, then applies updates atomically to prevent corruption.

6. Post-Requisites & Finalization

  • Runs actions after a successful patch (e.g., writing installed=true to registry, updating INI files).

  • Generates a detailed HTML log file.