Launcherino
What it is
The helbreath.co launcher is what Helbreath Empire and Helbreath Millennium players open before they play. It checks every file of the install, downloads what changed, updates itself, installs what the game needs and starts the game.
Launcherino is the technology behind Helbreath Empire's launcher. It is a library that other games can build their own launcher on. The launcher can run in its own window or be embedded inside the game client itself, and the administrator gets tools to upload updates and choose what each update delivers.
How it works
- A manifest of checksums: each release publishes
Patch.txt, one row per file with its path, checksum and size. The launcher started in 2017 with a CRC32 hasher; today it uses MurmurHash3, streamed in 1 MB blocks (3 to 10 times faster). The running client also checks its own files against that manifest, one a second, as an anti-tamper check. - Every file, every start: validation runs on all CPU threads, and a stamp cache keeps each file's size and write time with its checksum, so an unchanged file costs a look-up instead of a re-hash of gigabytes.
- Racing the mirrors: every update host is probed at once, each on its own thread, and the first that answers properly wins (a web page in place of the manifest is refused).
- Parallel downloads over HTTP: libcurl with one worker per hardware thread, each taking the next file off a shared counter. Every file is served as its own zip, unpacked under a temporary name, checked, then moved into place; a failed file is tried 3 times without stopping the rest, and free disk space is checked first.
- Honest progress: a meter thread reports size, smoothed speed and time left four times a second, and the bar moves by bytes, since one large pak can be most of an update.
- Signed releases: a SHA-256 of every file and an ECDSA P-256 signature over the manifest, made and checked with Windows' own CNG, so no extra DLL ships.
- Self-update and offline play: the launcher fetches its next version as a second exe, checks it and hands over to it. If no mirror answers, the player can still play with the files on disk.
- The rest of the install: the Visual C++ runtime (only when older, only if signed by Microsoft), the chat translator's models and ffmpeg for the in-game recorder.
- Fast logins: a game can save an account and character, encrypted per Windows user with DPAPI; a desktop shortcut updates and logs straight in.
Inside the game client
In client UI mode the launcher updates the game's exe and DLLs first, starts the game and hides. The game connects through a named pipe only that Windows user can open and talks JSON: it subscribes to the state (phase, bars, speed, time left, patch version, the release's news) and asks to play, retry or quit. Its Launcher scene draws with fills and text only, before any sprite loads, so the game never reads a file still being replaced; a file the game holds open is written beside it and swapped in once it closes. Both Helbreath clients share this through one header.
For other games
A game adopts the core by writing its brand: programs and folders, mirrors, signing key and the files always hashed in full. The core reports through a small interface (status lines, bars, phases, messages), so the launcher's window, the pipe API or a game's own scene are interchangeable. The protocol only ever adds fields, so an older game works with a newer launcher and the other way round. A packaged SDK and a brand stamping tool are next.
Admin tools
Started with uploader, the same exe publishes releases. It hashes the release folder on every thread, compares it with the live manifest and opens the list of changed files; I delete the lines I don't want to ship, press View patch to build the manifest from that selection, then Start upload. It reads every zip back against its checksum, signs the manifest, uploads to every mirror at once and stops at the first failure, so a manifest never goes up for missing files. It also archives each released client's exe and debug symbols by commit.
Technologies
- C++20
- Win32 / MFC
- libcurl
- zlib
- Windows CNG
- named pipes + JSON
- kazilib