kazilib

What it is

kazilib is my own C++ library: the code every game and tool I write stands on, kept in one place instead of copied from project to project. It holds nothing about any one game. Whatever two projects need alike lives here, written once, tested once, and improved for all of them at the same time.

It started in January 2023 from stlx, the utility code Helbreath Empire had carried since 2017, and grew as each new project took something from it and gave something back.

What's inside

One library, two versions where they must differ

Helbreath Millennium is live and Helbreath Empire is the next generation, and sometimes they need different behaviour from a class with the same name. kazilib keeps both side by side, each in its own inline namespace, lib::ml and lib::emp. A project only sees its own, so lib::Path means the right thing in each. Everything that is the same is written once, in plain lib, and both use it. Over time, code moves from the two versions into the shared one.

Used by

Proven by tests

The library has static tests of its own (grids, parallel loops, pathfinding, text tags), built and run on their own, each answering its number of failures. And since the Helbreath games run on it, every routine that plays them, thousands of checks of movement, packets and combat, is also a test of kazilib.

Technologies

Blog

From the blog

15 November 2026

The frame never waits: from one thread to many in Helbreath's servers

From the original server's single message loop, through MySQL queries that froze every player, to queues and a thread for each kind of work, and how that made tables of millions of rows searchable in a live game. A lesson first learned at Helbreath Olympia.

15 November 2026

From timestep to delta time: how Helbreath learned to walk smoothly

Helbreath's movement, from animation frames on a fixed clock to framerate-independent delta time, through Tiled, a prototype written to learn how it works, up to the step as a window of time that both games share today.

15 November 2026

The Broadcaster: from one 56,000-line switch to a class every game shares

How Helbreath's packets find their code: from the original server's single switch and hand-typed party numbers to the Broadcaster, born in 2017 and shared today by Helbreath Millennium and Helbreath Empire.

8 November 2026

A C++ beautiful syntax evolution with packet serialization

A Helbreath packet that once took three lines per field now takes one line per packet. Here is how I watched C++ get there: from pointer casts and hand-moved cursors to variadic templates, tuples, structured bindings and objects that serialize themselves.