/Documentation/Hints & Tips/Runtime Tips

Runtime Tips

To get the most out of LaunchBoost, follow these best practices regarding installation locations, file structures, and performance tuning.

📂 Installation Directory & Permissions
Avoid C:\Program Files (If Possible)

By default, Windows protects the C:\Program Files and C:\Program Files (x86) directories. Only Administrator users can write to them.

  • The Issue: If your game is installed here, LaunchBoost must request Administrator privileges (UAC Prompt) every time it needs to patch files. If the user declines the UAC prompt, the patch will fail with a “Write Access Denied” error.

  • The Tip: For a smoother, non-intrusive update experience, consider installing your game to a user-writable location by default, such as:

    • %LOCALAPPDATA%\MyGame\

    • C:\Games\MyGame\

    • User’s Documents folder (though usually reserved for saves).

Portable Mode (“Self” Detection)

If you want your game to be “Portable” (playable from a USB drive or moved freely), use the self directory detection mode in your LaunchBoost Project Config.

  • How it works: The patcher assumes the game files are located relative to the patcher.exe executable itself.

  • Benefit: No registry keys are required. The user can copy the folder to a new PC, run the patcher, and it will work immediately.

⚡ Performance & Download Speed

Optimize File Granularity (The “Big PAK” Problem)

LaunchBoost uses a file-level differential patch system. It checks the hash (SHA256) of every file.

  • The Issue: If you pack your entire game into a single 10GB data.pak file, changing one line of code changes the hash of the entire file. The user will have to re-download all 10GB.

  • The Tip: Split your game assets into smaller archives (e.g., textures.pak, audio.pak, levels_01.pak).

    • Ideal Size: Aim for file chunks between 10MB and 500MB.

    • Benefit: If you patch a texture, only textures.pak needs to be updated, saving bandwidth for you and time for the user.

For some engines like Unreal Engine, this is called Cooking and Chunking. It’s recommended to read up on it.

Link to Cooking and Chunking.

Enable Parallel Downloads

The patcher supports multi-threaded downloads, but it defaults to 1 thread (sequential) for safety. This is a Developer Edition only feature.

  • The Tip: Pass the -parallel X argument when launching the patcher to speed up downloads for users with high-speed internet.

  • Recommended:-parallel 4 is a sweet spot for most users.

patcher.exe -apiKey “…” -project “…” -parallel 4
CDN & Cache Busting

LaunchBoost includes built-in “Cache Busting” to ensure users always get the latest files, preventing stale downloads from aggressive CDNs (like Cloudflare). You must choose in your Patch Settings to enable this by using default. None means no cache busting.

  • Mechanism: It appends ?cb=<timestamp> to the URL requests.

  • The Tip: Ensure your CDN is configured to ignore query strings for caching content (images, paks), but respect query strings (or disable caching) for patchlist.json. The patchlist must always be fresh.

🔄 Workflow & Integration

The “Bootstrap” Pattern

Don’t ask users to run Game.exe directly. Instead, make Patcher.exe your primary entry point (rename it to Launcher.exe or MyGame.exe).

  1. User clicks your icon.

  2. LaunchBoost starts.

  3. Checks for updates (silent or visible).

  4. LaunchBoost uses Stage 6 (Post-Requisites) or the -relaunch argument to start the actual game executable once ready.

Seamless “Atomic” Updates

If you are using the Live Patching feature (updating while the game is running):

  • The Tip: Don’t just close your game process abruptly. Listen for the READY command on the TCP pipe (Port 32123).

  • Action: When your game receives READY:

    1. Save the player’s game state.

    2. Display a “Restarting for Update…” message.

    3. Cleanly exit the process.

    4. Let LaunchBoost handle the file swap and restart.

🛡️ Security Best Practices

API Key Protection

While LaunchBoost masks the API Key in logs (showing only the last 6 characters), you should still be careful.

  • The Tip: If you are distributing a custom launcher that calls LaunchBoost or you’re calling it from your game/app, do not hardcode the API Key in plain text strings if possible. Obfuscate it or fetch it from a secure pre-auth endpoint if your infrastructure allows.

Antivirus False Positives

Since patchers modify files and download executables, they can sometimes trigger heuristics in aggressive antivirus software.

  • The Tip: Digitally sign your patcher.exe binary (using a Code Signing Certificate). Windows SmartScreen and AV vendors trust signed binaries significantly more than unsigned ones. LaunchBoost’s integrity check verifies the file hasn’t been tampered with, but a digital signature proves who published it.

    If you’re serious about your game’s development and distribution, it is worth the investment of code signing your files including the patch system.