cat ./projects/save-the-fold/ENGINEERING.md

Save the Fold/

→ A shipped C++23 game with a fully procedural soundtrack — every playthrough gets its own music

A pastoral side-scroller: armed with sling and crook, lead your missing sheep back to the fold. Beneath the pixel art is the part I built it to prove — a deterministic procedural music engine and a from-scratch synthesizer suite, engineered with the same rigor I spent 25 years applying to enterprise C++.

Microsoft StoreC++23 modulesSFMLProcedural Music DSPDeterministic12 languages Agentic Workflow

music --from-seed

The soundtrack is compiled, not composed.

The music library takes a seed and produces a complete multi-track song — melody, harmony, rhythm, structure — as pure note-and-timing data, across 28 musical genres. Generation happens at load and transition time, never on the audio thread; the audio callback only ever pulls frames that already exist.

It is fully deterministic and reproducible: the same seed produces the same song on every machine and every build. That guarantee is enforced all the way down to strict floating-point semantics (/fp:strict) — the same discipline you want in any system where "it reproduced" matters more than "it usually works."

synth --from-hardware-specs

Instruments built from scratch, tested like hardware.

The note data becomes sound through an independent audio-processing library of original synthesizer instruments — modeled on classic hardware and textbook DSP, built from hardware documentation, service manuals, and published papers.

pure function core

The instrument library is render(events) → frames — no UI, no file I/O, no audio device, zero dependency on the game's frameworks. Composition and rendering are fully independent static libraries.

three test tiers

Exact spec tests where references publish numbers; DSP property tests (FFT response vs. theory, envelope timing, NaN/denormal/silence, click-free gating); and rendered-phrase measurement baselines checked into git, failing the build on drift.

ship --single-exe

Shipping discipline.

why-it-matters --for-your-team

Determinism under strict floating point, license compliance, audio-thread safety, measurement-based regression testing — none of that is game trivia. It is the same engineering that protects an enterprise platform processing millions of transactions a day, which is where I spent the last decade. Save the Fold is simply that engineering, in a form you can download and play.